Skip to content

ci: reject commits authored by Claude or Copilot - #5869

Merged
deadprogram merged 2 commits into
tinygo-org:devfrom
davecheney:commit-check
Oct 17, 2026
Merged

deadprogram merged 2 commits into
tinygo-org:devfrom
davecheney:commit-check

Conversation

@davecheney

@davecheney davecheney commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

The earlier version also read commit messages and the PR description. That caused too much debate about which patterns to match, so this version starts small. It checks only the author and committer email of each commit. Co-authored-by trailers and PR text are not checked. We can add more checks in later PRs if we need them.

@davecheney

Copy link
Copy Markdown
Contributor Author

@dgryski @jakebailey @deadprogram despite AGENTS.md, co-attribution commits do appear in PRs. This wastes maintainer bandwidth and additional cleanup work if they're not caught before merging -- of which I have been the most recent offender.

A job like this can automate the maintenance burden. In the future it could also be made a required build on the repo to prevent merges with co-attribution commits.

@deadprogram

Copy link
Copy Markdown
Member

Thanks for adding this @davecheney. I ran the pattern on my local machine against a set of sample trailers and the full dev history, which has no matches. The following is edited from an automated review:

  1. The pattern misses a few trailers that tools add, for example Assisted-by: Claude, Generated-by: Claude, Co-authored-by: Windsurf <noreply@windsurf.com> and Co-authored-by: Junie <junie@jetbrains.com>. Perhaps add assisted-by: and generated-by: and a few more tool names? A blocklist will always lag behind, so maybe just the common ones.

  2. It can also flag messages from people. Co-authored-by: Claude Dupont <claude@example.com> matches, and so does PR text such as "generated by gofmt using the copilot instructions". Since this may become a required check, should the co-authored-by part match only on the email domain or known bot addresses, such as noreply@anthropic.com or Copilot@users.noreply.github.com, rather than on the display name?

What do you think of these?

@davecheney

Copy link
Copy Markdown
Contributor Author

I think good enough is better than perfect here, it’ll
always be whack a mole, but hopefully this takes a bit of pressure off maintainers to double check co-authored commits, and give contributors faster feedback.

Let me take another swing at making this wider, not tighter, with the view that this will probably be a perpetual work in progress

@davecheney davecheney changed the title ci: reject coding tool attributions in PRs ci: reject commits authored by Claude or Copilot Oct 17, 2026

@deadprogram deadprogram left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for helping reduce the noise @davecheney

@deadprogram
deadprogram merged commit 30d7f17 into tinygo-org:dev Oct 17, 2026
34 checks passed
@davecheney
davecheney deleted the commit-check branch October 17, 2026 21:00
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.

2 participants