Skip to content

Squash commit message does not honor regex settings

Summary

When squashing a MR for a fast forward merge the squashed commit message is allowed to not match the commit message regex set on the project.

Reproducing it:

  1. Create a new repo initialised with a readme.
  2. Add the commit message regex. Can be anything
  3. Set merge requests to fast forward
  4. Create a MR with two semantic commits
  5. Tick Squash commits
  6. Change the squash commit message to something that doesn't match the regex
  7. Merge. Push Rule does not validate squash commit.

ZD GitLab Internal

Edited by Julius Kvedaras