Excluding Merge Commit from Regex based Push Rule

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Proposal

Context:

We use push rules to imply some mandatory rules for pushing commits to the repository. One of them is RegEx check for the commit message.

When one branch is merged into another, merge commit is created automatically by Git or IDEs like Intellij, Eclipse etc. We don't modify commit messages in regular development practises. Which causes RegEx rule to fail while pushing the merge commit and developer is forced to amend message of merge commit to comply the message with RegEx rule. Amending the message for a merge commit is not a regular practise as well as it is additional effort for an developer to perform this activity. Apart from this we don't want to apply RegEx rule for merge commits.

Reference Screenshot:

Expected Behaviour:

There should be an option to exclude merge commits from the RegEx rule evaluation. All other push rules should apply as it is apart from RegEx rule. Upon excluding merge commits from RegEx rules, when commit type is merge then RegEx rule shouldn't fail the push to the repository. Whereas RegEx rule to continue to run on all regular commits.

Link to Request: SFDC Link (Internal)

PM to Mention: @derekferguson

Edited by 🤖 GitLab Bot 🤖