Skip to main content
All CollectionsChange Management with SaltoIntegrating Git and CI/CDGitLab
Configuring Branch and Merge Protection Rules in GitLab
Configuring Branch and Merge Protection Rules in GitLab
Support avatar
Written by Support
Updated over 2 months ago

GitLab treats Branch Protection and Merge Protection as two separate functions.

To protect the branch, navigate to the repository used by Salto, expand Settings on the left, select Repository, and click on the Expand button for "Protected branches."

For the Branch, type in salto/before/env/<targetEnvId>/deployment/* and click on Create wildcard salto/before/env/<targetEnvId>/deployment/*.

(To apply the rules to all environments you can add salto/before/*).

To ensure Salto can work properly on the protected branches, choose "Developers + Maintainers" for both the "Allowed to merge" and "Allowed to push and merge" dropdown selectors and click on the Protect button.

To configure Merge protection, navigate to the repository used by Salto, expand Settings on the left, select Merge requests, and configure the merge options that adhere to your organizations settings.

* Required approvals are part of GitLab's Premium tier or higher.

Did this answer your question?