Add local_reference (Merge Request ID) to commit template
What does this MR do and why?
This PR adds a %{local_reference}
Commit message templates variable that resolves to a simple merge request ID like !123
. Currently, %{reference}
resolves to the full MR reference like path/to/group/project!123
.
I'd like to reference IDs in the commit name like GitHub does by default with squash merges (commit message (#PR-ID)
).
Solves #199823
TODO
-
Add tests to https://gitlab.com/gitlab-org/gitlab/-/blob/master/spec/lib/gitlab/merge_requests/message_generator_spec.rb -
[Help wanted] Settle on a name for this variable. local_reference
may not be ideal. Here's a list of possible options I found:-
local_reference
(currently implemented) short_reference
id
mr_id
-
-
[Help wanted] Update the documentation to reflect the right introduction version.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Zadkiel
Merge request reports
Activity
Please register or sign in to reply