rangareddy opened a new pull request, #859:
URL: https://github.com/apache/incubator-xtable/pull/859

   ## What
   
   Adds an automated CI guard so PR commits that credit an AI assistant 
(Claude) as a co-author are caught in CI, instead of relying on reviewers to 
spot the trailer.
   
   Closes #858 · Adapted from apache/hudi#19134.
   
   ## Changes
   
   - **`.github/workflows/commit_coauthor_validation.yml`** — a 
`validate-commit-coauthor` job that runs on `pull_request` events 
(`opened`/`reopened`/`synchronize`) targeting `main`. It lists the PR's commits 
via the GitHub API and fails if any commit message contains a `Co-authored-by:` 
trailer that either uses the `[email protected]` email or names a Claude 
model (opus/sonnet/haiku/fable/mythos/instant/code, or a version number). It 
prints the offending SHAs and how to fix them (amend/rebase to drop the 
trailer, then force-push). A human co-author with a personal email — even one 
named "Claude" — is **not** flagged, and mentions of 
Claude/`[email protected]` in the commit body outside a trailer are not 
flagged.
   - **`.asf.yaml`** — registers `validate-commit-coauthor` under 
`protected_branches.main.required_status_checks.contexts` so the check is 
required to merge (this block did not exist before).
   
   ## Impact / Risk
   
   CI/process only; no code or user-facing changes. The check is read-only 
(GitHub API listing of PR commits). Low risk.
   
   ## Notes
   
   The regex is taken from the Hudi PR, which verified it against positive 
cases (`Co-authored-by: Claude <[email protected]>`, `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). Both YAML files were validated locally.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to