Utilize Co-authored-by convention in UX
Git commits often have several authors and under the current workflow, authors are forced to decide who will be the git "Author" on a commit. For pair programming and mentor/mentee style programming, this can make attributing a commit visually within gitlab difficult. There are conventions for attributing co-authors but they are external to git itself.
Similar to how gitlab parses the message body for issues references, Gitlab should recognize
Co-Authored-By: [name] <[email]> in the message body, and should display user icons on UI related to the commit. Here is an example commit message:
commit ae878fc8b9761d099a4145617e4a48cbeb390623 Author: Foo Bar <firstname.lastname@example.org> Date: Fri Jun 1 01:44:02 2012 +0000 Refactor gitlab to support co-authors * Do awesome work * Make an awesome product * Be better than the competition Fixes: #[number redacted] Co-Authored-By: Spam King <email@example.com> Co-Authored-By: Monty Python <firstname.lastname@example.org>
I work at a shop that does a lot of pair programming and this would be a huge boon to a pair-driven workflow. We frequently encounter mis-attributed commits and having the UX in gitlab support a co-author workflow would significantly improve code reviews and our ability to visually git blame and followup on changes.
I have chosen the "Co-Authored-By:" naming scheme from previous standards that I encountered while researching this topic.
Links / references
If your commit has additional authors or people who helped in creating the commit, you can make their contributions known in the gitlab UI by putting
Co-Authored-By: [name] <[email]> on it's own line within the body of your commit message.