-
Notifications
You must be signed in to change notification settings - Fork 98
Description
Description
The volcano-sh-bot commit message validator incorrectly flags legitimate commits containing Co-authored-by trailers as having "invalid commit messages", claiming they contain "@" mentions or issue-closing keywords when they do not.
Current Behavior
When accepting code suggestions from GitHub bots (Gemini Code Assist, Copilot, etc.), commits automatically include standard Co-authored-by trailers per [GitHub convention](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors):
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
The bot then flags these as invalid:
Keywords which can automatically close issues and at(@) or hashtag(#) mentions
are not allowed in commit messages.
The list of commits with invalid commit messages:
047ddf3 Update README.md
Expected Behavior
The bot should ignore Co-authored-by trailers when validating commit messages, as:
- These are standard Git/GitHub convention for attribution
- Email addresses in trailers are not @ mentions
- They don't contain issue-closing keywords
- They're automatically generated by GitHub's UI
Steps to Reproduce
- Create a PR to
volcano-sh/website - Accept a code suggestion from any GitHub bot (Gemini, Copilot, etc.)
- Observe the
do-not-merge/invalid-commit-messagelabel applied - Force-push to squash/remove the co-authored commits
- Observe the label removed (proving the commit message body was valid)
Evidence
- Commits
047ddf3and9c6fcddflagged as invalid - Both contain only "Update README.md" in subject/body
- Only "violation" is the
Co-authored-bytrailer - After force-push removing trailers, label automatically removed
Impact
- Blocks legitimate contributions that use GitHub's native collaboration features
- Creates confusion for new contributors
- Wastes reviewer time investigating false positives
- Discourages use of code review bots (Gemini, Copilot, etc.)
Proposed Fix
Update the bot's commit message validation regex to exclude Co-authored-by trailers from:
- "@" mention detection
- Issue keyword detection
Example exclusion pattern:
# Ignore lines matching Co-authored-by trailer format
^Co-authored-by: .+ <.+@.+>$Environment
- Repository:
volcano-sh/website - Bot:
volcano-sh-bot - Trigger: Any commit with
Co-authored-bytrailer - PR Example: #[your-pr-number]
Related
- [GitHub Docs: Creating commits with multiple authors](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors)
- Standard Git trailer format: [git-interpret-trailers](https://git-scm.com/docs/git-interpret-trailers)
Labels: kind/bug, area/ci, priority/medium