[858] Add commit co-author and PR title validation CI checks#859
Open
rangareddy wants to merge 2 commits into
Open
[858] Add commit co-author and PR title validation CI checks#859rangareddy wants to merge 2 commits into
rangareddy wants to merge 2 commits into
Conversation
Add a GitHub Actions workflow that fails a PR when any of its commits carries a Claude co-author trailer (a Co-authored-by: line using noreply@anthropic.com or naming a Claude model), so this is caught in CI rather than by reviewers. A human co-author with a personal email is not flagged. Register validate-commit-coauthor as a required status check on main in .asf.yaml. Adapted from apache/hudi#19134.
Add a GitHub Actions workflow that validates the PR title follows an
accepted format: a GitHub issue reference "[<issue-number>] description",
"[MINOR] description", or a Conventional Commit ("type(scope): subject").
Register validate-pr-title as a required status check on main. Adapted
from apache/hudi's pr_title_validation.yml.
Contributor
Author
|
Hi @the-other-tim-brown / @vinishjail97 To address the comment about co-authorship, this PR updates our commit template to avoid automatically listing Claude as a co-author. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds two CI validation workflows (and registers both as required status checks on
mainin.asf.yaml), adapted from Apache Hudi's.github/workflows:validate-commit-coauthor)validate-pr-title)Closes #858 · adapted from apache/hudi#19134 and apache/hudi
pr_title_validation.yml.Changes
.github/workflows/commit_coauthor_validation.ymlRuns on PRs to
main, lists the PR's commits via the GitHub API, and fails if any commit message has aCo-authored-by:trailer that usesnoreply@anthropic.comor names a Claude model (opus/sonnet/haiku/fable/mythos/instant/code, or a version number). Prints the offending SHAs and how to fix them. A human co-author with a personal email — even one named "Claude" — is not flagged..github/workflows/pr_title_validation.ymlRuns on PR open/edit/reopen/synchronize to
mainand accepts a title in any of these forms:[<issue-number>] description— XTable's common GitHub-issue reference style (e.g.[858] ...)[MINOR] descriptiontype(scope): subject(types: feat, fix, docs, style, refactor, perf, test, build, ci, chore), validated with the pinnedamannn/action-semantic-pull-requestaction..asf.yamlRegisters both
validate-commit-coauthorandvalidate-pr-titleunderprotected_branches.main.required_status_checks.contexts(this block did not exist before).Impact / Risk
CI/process only; no code or user-facing changes. The co-author check is read-only (GitHub API listing of PR commits). Low risk.
Notes
Co-authored-by: Claude <noreply@anthropic.com>,Claude Opus 4.5,claude sonnet,Claude 3.7,Claude Code) and negative cases (human co-authors including ones named Claude, and Claude/anthropic mentions outside a trailer).[NNN] ...,[MINOR] ..., and Conventional Commits likefix(delta): ...); the title check accepts all of these. Titles like dependabot'sBump X from Y to Zwon't match — apply thebot/ignore-semantic-pull-requestlabel to skip, or maintainers may prefer to makevalidate-pr-titleadvisory rather than required.