Support Full Suite of git trailers in template variables
Proposal
GitLab supports the use of commit templates for merge commits and squash merges undertaken through the user interface. In the case of squash commits this can lead to an unexpected loss of data (see Zendesk #33478 for further analysis)
We would like to propose three things:
-
The supported variables is expanded to include other common git message trailers (e.g. Signed-off-by from
git commit --signoff
) -
An additional variable is added
%{latest_git_trailers}
that provides all of the trailers specified on the latest commit (i.e. the equivalent ofgit log --max-count=1 --format="%(trailers)"
-
The default template for squash merges is updated to include (2).
In the case of (1) and (3), with specific reference to Signed-off-by:
this is important due to recent feature additions such as the DCO push rule
In the case of (2) this is desirable as we record additional information in commit trailers, for example the shasum -a 256
of the repository .pre-commit-config.yaml alongside any steps that have been skipped.
Link to request: https://gitlab.my.salesforce.com/0016100000K8E5P
Priority: customer priority4
Why interested: As outlined above
Problem they are trying to solve: maintaining audit information
Current solution for this problem: manually update commit message, or perform squash client-side
Impact to the customer of not having this: Ongoing risk of unexpected data loss/disabling of UI based squashed merges on our account
Questions:
PM to mention: