Skip to content

Add support for merge request template variables

What does this MR do and why?

This MR adds support for variable substitution to merge request templates, similar to (and reusing most of the code for) commit/merge message templates. Not all variables supported by commit/merge message templates are available, as merge request templates are interpreted at the beginning of a new MR that has not been persisted to the database and don't make sense in that context.

The current list of variables that will be interpreted by this MR are: %{source_branch}, %{target_branch}, %{first_commit}, %{first_multiline_commit}, %{co_authored_by}, and %{all_commits}

Screenshots or screen recordings

Screen_Shot_2022-06-10_at_22.27.46

Screen_Shot_2022-06-10_at_22.26.41

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #24770 (closed)

Edited by David Barr

Merge request reports