Skip to content

Cleaner merge commit messages

What does this MR do?

  • Clean up default merge commit message by removing MR description from it
  • Add closing issues reference to message
  • Add warning message in the UI if someone mention and Issue but does not add the closing pattern for that issue
  • Add a toggle in the UI for the user to choose to use the description in the commit message

I spent a bit more time than I wanted in the tests as I was trying to cover the cases where reference and urls are added to the closing pattern, but I couldn't get the case where a url for an issue in another project to work on tests (not without spending more time looking how everything is tied together).

The backend part for Issues mentioned but not in the close pattern is done, but I didn't get to work on the frontend yet. I am thinking of adding the warning message in here: Screenshot_2016-11-24_07.58.08

As for adding the option to use the description in the commit message, I was thinking of doing it with javascript as the users toggles a checkbox. Should I go that way or you guys have a better way of doing this? When the user checks the box it would add the description before the See merge request part of the message like this: Screenshot_2016-11-24_08.03.14

What are your thoughts @DouweM @smcgivern?

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/23462

Merge request reports