Skip to content

[858] Add commit co-author and PR title validation CI checks#859

Open
rangareddy wants to merge 2 commits into
apache:mainfrom
rangareddy:858-commit-coauthor-validation
Open

[858] Add commit co-author and PR title validation CI checks#859
rangareddy wants to merge 2 commits into
apache:mainfrom
rangareddy:858-commit-coauthor-validation

Conversation

@rangareddy

@rangareddy rangareddy commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

What

Adds two CI validation workflows (and registers both as required status checks on main in .asf.yaml), adapted from Apache Hudi's .github/workflows:

  1. Commit co-author validation (validate-commit-coauthor)
  2. PR title validation (validate-pr-title)

Closes #858 · adapted from apache/hudi#19134 and apache/hudi pr_title_validation.yml.

Changes

.github/workflows/commit_coauthor_validation.yml

Runs on PRs to main, lists the PR's commits via the GitHub API, and fails if any commit message has a Co-authored-by: trailer that uses noreply@anthropic.com or 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.yml

Runs on PR open/edit/reopen/synchronize to main and accepts a title in any of these forms:

  • [<issue-number>] description — XTable's common GitHub-issue reference style (e.g. [858] ...)
  • [MINOR] description
  • a Conventional Commit — type(scope): subject (types: feat, fix, docs, style, refactor, perf, test, build, ci, chore), validated with the pinned amannn/action-semantic-pull-request action.

.asf.yaml

Registers both validate-commit-coauthor and validate-pr-title under protected_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

  • The co-author regex is taken from the Hudi PR, verified against positive cases (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).
  • XTable PR titles are currently mixed ([NNN] ..., [MINOR] ..., and Conventional Commits like fix(delta): ...); the title check accepts all of these. Titles like dependabot's Bump X from Y to Z won't match — apply the bot/ignore-semantic-pull-request label to skip, or maintainers may prefer to make validate-pr-title advisory rather than required.
  • Both YAML files were validated locally.

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.
@rangareddy rangareddy changed the title [858] Add commit co-author validation as a required CI check [858] Add commit co-author and PR title validation CI checks Jul 22, 2026
@rangareddy

Copy link
Copy Markdown
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.

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 commit co-author validation as a required CI check

1 participant