Before starting a new issue, I always create a new branch for it (directly from Gitlab). When I finish the job on that issue (and tests are Ok), I create a merge request (from Gitlab).
After the merge is done, I have an "auto-generated" message linked to that merge (this message is very generic and identical to all merges I done).
The some thing happens also when I merge develop
into master
:
Is there a way to customize the merge request message to have a message like this:
Note:
Change the commit message. You can use git commit --amend for the latest commit change. It must be the latest commit. Amend it.
On the command line, navigate to the repository that contains the commit you want to amend. Type git commit --amend and press Enter. In your text editor, edit the commit message, and save the commit.
Revise a merge request If you need to update a merge request (for example in response to a request from the review shifter), simply push to the same branch again after editing (and testing) the files.
Globally, automatically - I don't think so. As I see, it's hard-coded:
message = [ "Merge branch '#{source_branch}' into '#{target_branch}'", title ] if !include_description && closes_issues_references.present? message << "Closes #{closes_issues_references.to_sentence}" end message << "#{description}" if include_description && description.present? message << "See merge request #{to_reference}" message.join("\n\n")
You can override message for any merge request manually:
It's also possible if you create merge request with API. It requires your time but you can build some mechanism that fetches all data with API and set it as a description (but you must ensure all is available with API, issueDescription and so on).
Even tho @piotr-dawidiuk makes a good point, I believe is outdated.
According to gitlab docs, you can create your .md
files, changing all templates. Check it here. As it states,
Similarly to issue templates, create a new Markdown (.md) file inside the .gitlab/merge_request_templates/ directory in your repository. Commit and push to your default branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With