By default, deployment requests can be opened and deployed by all collaborators, as long as the changes pass Salesforce validation. You can choose to enforce restrictions on how a deployment request is deployed in your repository.
Repository owners and can enforce certain workflows or requirements, before a collaborator can deploy, by creating protected branch rules.
You can create a branch rule in a repository for a specific branch, all branches, or any branch that matches a naming pattern specified with the fnmatchfnmatch - Unix filename pattern matching, which is different from regular expressions. syntax. For example, to require any branch containing the word
prod to have at least two peer reviews before deploying, you can create a branch rule for
*prod*. For more information, see "Configuring protected branches."
If a repository has multiple protected branch rules that affect the same branches, the most restrictive settings from each rule have the highest priority. For example, if there is one rule that requires 2 peer reviews and another rule requires 4, then the number 4 takes higher priority.
Updated almost 2 years ago