Protected branches should target a meaningful branch name (main, master, release/*, prod*, live*) — not arbitrary feature branches. The match operator uses the regex pattern from the GL_POLICY_VAR_PROJECT_PROTECTED_BRANCH_PATTERNS library variable. Protecting feature/experimental branches inflates inventory and dilutes the meaning of branch protection.
1. Go to project Settings > Repository > Protected branches. 2. Remove protection from non-essential branches (feature/*, experiment/*, etc.). 3. Keep protection on main, master (legacy), release/*, prod*, live* branches.
{
"target": "GLProtectedBranch",
"if": {
"allOf": [
{
"resource": "GLProtectedBranch",
"property": "Name",
"operator": "match",
"value": "(main|master|protected|release|live|prod|prd)"
}
]
},
"then": {
"effect": "Audit"
}
}
Copyright © DevOps Shield. All Rights Reserved. Privacy Policy | Cookie Policy | Terms and Conditions | v1.0.2