Top-level groups should enforce a default_branch_protection level greater than 0 (no protection) so that all new projects in the group inherit a baseline branch protection. Levels: 0 = none, 1 = developer can push and merge, 2 = developer can merge (push only by Maintainer), 3 = full protection (Maintainer-only push and merge), 4 = code owner approval. greaterThan 1 means at least Partially Protected.
1. Go to your top-level Group Settings > Repository > Default branch. 2. Set Default branch protection to Fully protected (or higher). 3. Save changes.
{
"target": "GLGroup",
"if": {
"allOf": [
{
"resource": "GLGroup",
"property": "DefaultBranchProtection",
"operator": "greaterThan",
"value": 1
}
]
},
"then": {
"effect": "Audit"
}
}
Copyright © DevOps Shield. Tous droits réservés. Politique de confidentialité | Politique de témoins | Conditions d'utilisation | v1.0.2