Provide way of enforcing conventional commits in MRs
Problem to solve
One way of automatically generating changelogs is to ask MRs to include at least one commit in the conventional commit format. Unfortunately, this is easily forgotten, and results in a change being lost. It would be great to add a way of encouraging these commits, and reminding developers to include them.
Intended users
A Development Team Lead would change a repository level setting. Developers would then be presented with new UI when opening and merging an MR.
User experience goal
A Development Lead should be confident that all MRs add an entry to the changelog, unless this was specifically decided against.
Proposal
I propose the ability to specify a RegEx in the project's settings, which each commit message's first line is matched on. There would also be two settings, specifying which commits this must apply to (at least one/all), and what to do if they don't (warn/block merging).
When opening an MR that does not fulfil the requirement:
 
A similar message would show before merging the MR.
Further details
Above is just one idea of how this could be approached. I would certainly be open to suggestions.
If the relevant staff at GitLab are keen to see an MR for this, I may be able to allocate some development time to it.
Permissions and Security
Documentation
Availability & Testing
What does success look like, and how can we measure that?
Success would be a large project using this, with developers working on the project adding a changelog commit because of the reminders GitLab gives them. They should not find the UX overbearing.
What is the type of buyer?
I believe this should be available to as many people as possible, as repositories of all sizes may wish to catalogue changes.
Is this a cross-stage feature?
I don't believe so.
Links / references
cc/ @m_gill
