Skip to content

ci: add contributor check to validate-files-and-commits#687

Open
Anshumancanrock wants to merge 2 commits into
urunc-dev:mainfrom
Anshumancanrock:check-contributors
Open

ci: add contributor check to validate-files-and-commits#687
Anshumancanrock wants to merge 2 commits into
urunc-dev:mainfrom
Anshumancanrock:check-contributors

Conversation

@Anshumancanrock
Copy link
Copy Markdown

Description

When a PR author isn't listed in .github/contributors.yaml, the nubificus/git-trailers action fails at merge time after the review is already done. This happens in both add-git-trailers.yml and pr-merge.yml.

This PR adds a check-contributor job to validate-files-and-commits.yml that catches missing contributors early during CI.

The job normalizes the PR author's username using the same sed logic as nubificus/git-trailers (strips [bot] suffix, app/ prefix), does a primary lookup by YAML key, and falls back to a name field search for bot accounts. If the author isn't found, it fails with a message showing exactly what entry to add.

Related issues

How was this tested?

Tested the grep matching logic locally against the current contributors.yaml:

  • Normal users (ananos, johnp41) : matched correctly
  • Hyphenated names (mgkeka-nbfc) : matched correctly
  • Case-sensitive entries (DionisiaK4) : matched correctly
  • Bot accounts (dependabot[bot]) : matched via bot fallback
  • Non-existent users : correctly rejected
  • Partial username matches (anano vs ananos) : correctly rejected
  • Empty input : correctly rejected

LLM usage

N/a

Checklist

  • I have read the contribution guide.
  • The linter passes locally (make lint).
  • The e2e tests of at least one tool pass locally (make test_ctr, make test_nerdctl, make test_docker, make test_crictl).
  • If LLMs were used: I have read the llm policy.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2026

Deploy Preview for urunc canceled.

Name Link
🔨 Latest commit b17f246
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6a06f0c2b7c50b0008f28bfe

@Anshumancanrock Anshumancanrock force-pushed the check-contributors branch 2 times, most recently from c27b3d0 to b797398 Compare May 15, 2026 10:06
Fixes: urunc-dev#683

Signed-off-by: anshumancanrock <anshu.1239.as@gmail.com>
@Anshumancanrock
Copy link
Copy Markdown
Author

Hi @cmainas, please take a look at this PR and let me know your thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a worfklow to check if contributor exists in contributors.yaml

1 participant