Skip to content

feat(validator): accept co-author trailers after the JIRA reference - #51

Closed
aureldent wants to merge 1 commit into
masterfrom
feat/co-authored-by-after-jira
Closed

aureldent wants to merge 1 commit into
masterfrom
feat/co-authored-by-after-jira

Conversation

@aureldent

Copy link
Copy Markdown

Summary

GitHub reads Co-authored-by: trailers only from the last paragraph of a commit message.
The validator rejects any line after the JIRA reference, so a feat or fix commit cannot have both its JIRA footer and a co-author that GitHub shows.

This PR accepts a last paragraph of Co-authored-by: lines after the JIRA reference or the broken part:

feat(app): add the export button

LUM-1234

Co-authored-by: Jane Doe <jane.doe@example.com>

Other text after the JIRA reference still fails, as before.

  • Risk: low. The change only accepts messages that failed before. All earlier valid messages stay valid (all existing bats tests pass).
  • Rollout: repos that use @master get it at merge. The v1 tag points to a commit from 2025-09-02, so repos that use @v1 need the tag moved, or a new tag.

Test

Verified: bats ./*.bats: 116 tests, 0 failures. The 2 new valid cases failed before the change.
Not proven: the GitHub Action run on a real PR.

Evidence
  • Red, before the change: not ok 95 structure: valid commit message with jira and co-author trailers, not ok 96 structure: valid commit message with jira, broken and co-author trailers.
  • Green: 1..116, no not ok line.
  • check_message.sh end to end:
    • JIRA, then a Co-authored-by paragraph: exit 0.
    • JIRA, then other text: exit 1, only Co-authored-by trailers could be in the paragraph after the JIRA reference or the broken part.
    • Only a Co-authored-by paragraph on a feat: exit 9 (JIRA missing), as before.

GitHub reads Co-authored-by trailers only from the last paragraph of the
message. The validator rejected any line after the JIRA reference, so a
commit could not have both a JIRA footer and a co-author that GitHub shows.

A last paragraph of Co-authored-by lines can now follow the JIRA reference
or the broken part. Other text there still fails.
@aureldent

Copy link
Copy Markdown
Author

Not needed any more: dev-agent now names the requester as the commit author, so git blame shows them, and no trailer is needed. Closing.

@aureldent aureldent closed this Nov 27, 2026
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.

1 participant