DocsResource KindsSub ResourcesGitlabProtectedBranch

GitlabProtectedBranch

Schema

Only if the project’s spec.protectedBranches entire array is left undefined will the configDefaults.protectedBranches of the referenced GitlabDefaults be used.

For detailed info about the properties, please reference GitLab’s documentation.

PropertyTypeRequiredDescription
namestringYesName or pattern of the branch to protect (e.g., main, release/*)
allowForcePushbooleanYesWhether force push is allowed to this protected branch
codeOwnerApprovalRequiredbooleanYesWhether approval from code owners is required for merge requests targeting this branch
mergeAccessLevelsno_one | developer | maintainerNoWho can merge into this protected branch (nullable - can be empty array)
pushAccessLevelsno_one | developer | maintainerNoWho can push directly to this protected branch (nullable - can be empty array)
unprotectedAccessLevelsno_one | developer | maintainerNoWho can unprotect this branch (nullable - can be empty array)