Available in the Enterprise version
Salto Administrators can set commit message patterns in order to enforce some structure on users' git commit messages. For example, an administrator may want to ensure that every git commit contains a valid ticket ID, to prevent commits that can't be traced back to tickets.
Only organizational administrators can change commit message pattern definitions
To set up a new commit message pattern, go to the organizational settings menu, and locate the "Commit Message Patterns" section.
Click "Add Pattern" to set up a pattern and a help message.
An optional help message can be presented to users who try to commit messages which don't contain the defined pattern. Use it to help users craft a correct, compliant commit title and message.
You can then decide whether your pattern is enforced
- On all repositories
- On specific repositories
- On specific branches of specific repositories
Note that if more than one pattern is defined on a specific branch or repository, commits to that destination should match all those patterns.
Matching on specific patterns can also be disabled or enabled by using the toggle on the right:
- ACME-\d+ : This will make sure all commit messages contain a ticket ID which starts with "ACME", followed by a hyphen, and then some number. The ticket ID can appear anywhere in the title or the message itself.
- ^ACME-\d+ : This is similar to the above, but makes sure that the commit title starts with the ticket ID
Updated 20 days ago