When I use the merge request interface to merge MRs, the commit author loses authorship and the requestor gets it instead. How to keep authorship?

Problem to solve

  • I want to retain authorship of the authors of commits.
  • I expect that when I merge a MR, the author of the commit (assuming there is only one) ends up in the commit history as the author of the commit
  • actual: the person who requested to merge gets authorship in the commit history

Reproduce

  • as person A, create a MR
  • as person B, push a commit to the newly created MR
  • as person A, merge the MR
  • check the commit history of the branch the MR got merged into
  • expect: the author is the commit author
  • actual: the author is the MR requestor

In the above image, Kristina created the MR, Evonne is the author of the commit, and Doris adjusted the commit but retained the author of the commit to be Evonne. Doris then interacts with the interface and clicks ‘Merge’

But once merged, Kristina, who created the MR, gets authorship, and the original commit author, Evonne is lost.

Additionally, when cherry-picking this, the same thing happens again. Kristina loses authorship and the person who created the merge request gets the authorship, which is not what I expected.

Once that cherry-pick MR is merged, once again the commit author is lost and the person who requested the MR takes authorship.

Is there a way to change who gets authorship?

Version of GitLab: 17.1