Feature / Bug Description
Currently, update-flake-lock constructs the Git commit message by taking INPUT_COMMIT-MSG and appending the generated Nix update summary (Flake lock file updates:\n\n...) below it:
<INPUT_COMMIT-MSG>
Flake lock file updates:
• Updated input '...':
If commit-msg contains Git trailers (such as Co-authored-by: Name <email@domain.com>), update-flake-lock places Co-authored-by: above the Flake lock file updates: text block.
According to Git trailer specification (RFC 822 / Git commit conventions), Git trailers must be located at the very end of the commit message body (after the last paragraph). Because Flake lock file updates: is appended below Co-authored-by:, Git and GitHub do not recognize Co-authored-by: as a valid trailer, which breaks co-author attribution and commit verification rendering on GitHub.
Expected Behavior
Either:
- Git trailers (such as
Co-authored-by:) placed in commit-msg should be placed at the very end of the commit body (after the Flake lock file updates: block), or
- An explicit
commit-trailers input parameter is provided so trailers can be placed at the bottom of the generated commit message.
Related
Implementation
Those might be of use:
git interpret-trailers
git log --format="%(trailers)"
git commit --trailer "Co-authored-by: ..."
And again, on this note, this would be way simpler and less error prone if Git had such attributes to be native data for commits objects instead of relying on unstructured strings inside of commit messages.
Feature / Bug Description
Currently,
update-flake-lockconstructs the Git commit message by takingINPUT_COMMIT-MSGand appending the generated Nix update summary (Flake lock file updates:\n\n...) below it:If
commit-msgcontains Git trailers (such asCo-authored-by: Name <email@domain.com>),update-flake-lockplacesCo-authored-by:above theFlake lock file updates:text block.According to Git trailer specification (RFC 822 / Git commit conventions), Git trailers must be located at the very end of the commit message body (after the last paragraph). Because
Flake lock file updates:is appended belowCo-authored-by:, Git and GitHub do not recognizeCo-authored-by:as a valid trailer, which breaks co-author attribution and commit verification rendering on GitHub.Expected Behavior
Either:
Co-authored-by:) placed incommit-msgshould be placed at the very end of the commit body (after theFlake lock file updates:block), orcommit-trailersinput parameter is provided so trailers can be placed at the bottom of the generated commit message.Related
Implementation
Those might be of use:
git interpret-trailersgit log --format="%(trailers)"git commit --trailer "Co-authored-by: ..."And again, on this note, this would be way simpler and less error prone if Git had such attributes to be native data for commits objects instead of relying on unstructured strings inside of commit messages.