Include Co-authored-by lines from MR commits in squash commit message
(Disclosure: I used GitHub Duo Chat to help me articulate the following. :slight_smile:) ### Problem When squashing a merge request, `Co-authored-by` lines from individual commits are lost, meaning co-authors don't receive proper attribution in the final commit history. The `Author` field is already supported and can be used to populate the `Co-authored-by` field in a squashed commit message using the `%{co_authored_by}` variable. However, sometimes (particularly when working with AI agents like Claude Code), the actual branch will not contain commits with multiple `Author` values, but rather commits with an already prepopulated `Co-authored-by` line. ### Proposal Add automatic extraction of `Co-authored-by` lines from all commits in an MR and include them in the squash commit message as git trailers. **Implementation suggestions:** 1. Collect all `Co-authored-by` lines from the MR's commits 2. Deduplicate identical lines 3. Add them as git trailers in the squash commit message 4. Ensure proper formatting to avoid breaking git trailers (as addressed in #349622) **Example of desired result:** ``` Fix authentication bug Resolves issue with login timeout Co-authored-by: Jane Doe <jane@example.com> Co-authored-by: John Smith <john@example.com> ``` ### Suggested Labels: * `type::feature` * `Category:Code Review Workflow` * `group::code review` * `merge requests` * `devops::create` ### Related Issues: * References the current work item (#349622) which handles git trailers formatting * Could potentially use the `%{co_authored_by}` variable mentioned in the current issue ### Additional Considerations: * Should work with existing squash commit templates * Must maintain proper git trailer formatting * Consider making it configurable at project/group level
issue