Summary
As AI-assisted development becomes more common, commit messages may include Co-Authored-By: trailers that credit AI agents (GitHub Copilot, Claude, etc.). The Co-Authored-By trailer is a Git convention for crediting human co-authors, and crediting an AI agent with this trailer misrepresents authorship.
This issue requests an optional validation rule that fails a commit if any Co-Authored-By trailer names a known AI agent instead of a human.
Proposed Behavior
When the feature is enabled, the action should:
- Parse the commit body for Git trailers — lines of the form
Token: value appearing after a blank line.
- For each
Co-Authored-By: Name <email> trailer found, check whether Name or email matches a known AI agent pattern.
- If a match is found, fail the commit with a message such as:
Co-Authored-By trailer must specify a human author, not an AI agent
The check must be opt-in (disabled by default), enabled via an action input, for example:
- uses: FlowingCode/action-conventional-commits@vX.Y.Z
with:
disallow-ai-coauthors: true
Known AI Agent Patterns (initial list)
The detection should cover at least the following well-known patterns (name or email):
| Agent |
Typical trailer value |
| Anthropic Claude |
... <noreply@anthropic.com> |
| GitHub Copilot |
GitHub Copilot <copilot@github.com> |
| GitHub Actions bot |
... <...github-actions[bot]...> |
| Generic bot accounts |
name or email containing [bot] |
The list should be extensible (e.g., a hardcoded array in source that can grow over time).
Acceptance Criteria
Summary
As AI-assisted development becomes more common, commit messages may include
Co-Authored-By:trailers that credit AI agents (GitHub Copilot, Claude, etc.). TheCo-Authored-Bytrailer is a Git convention for crediting human co-authors, and crediting an AI agent with this trailer misrepresents authorship.This issue requests an optional validation rule that fails a commit if any
Co-Authored-Bytrailer names a known AI agent instead of a human.Proposed Behavior
When the feature is enabled, the action should:
Token: valueappearing after a blank line.Co-Authored-By: Name <email>trailer found, check whetherNameoremailmatches a known AI agent pattern.The check must be opt-in (disabled by default), enabled via an action input, for example:
Known AI Agent Patterns (initial list)
The detection should cover at least the following well-known patterns (name or email):
... <noreply@anthropic.com>GitHub Copilot <copilot@github.com>... <...github-actions[bot]...>[bot]The list should be extensible (e.g., a hardcoded array in source that can grow over time).
Acceptance Criteria
Co-Authored-Bytrailer matching a known AI agent pattern are rejected with a clear error message.Co-Authored-Bytrailer, or with a trailer that does not match any AI pattern, pass normally.action.ymlis updated with a documenteddisallow-ai-coauthorsboolean input (defaultfalse).