Create and Protect a Release Branch
A 2-step recipe with GitLab. We can help you get access.
Recipe · 2 steps
Create and Protect a Release Branch
with GitLab · Software Construction Management
Works with AI assistants
Create a branch and then protect it in a single flow.
- Create the branch from the supplied ref.
- Protect the freshly created branch, setting whether developers may push and merge.
What you'll need to have ready
- privateToken: GitLab Private-Token used to authenticate the API calls.
- projectId: The ID or URL-encoded path of the project.
- branch: The name of the branch to create and protect.
- ref: The ref (branch name or commit sha) to create the branch from.
- developersCanPush: Whether developers can push to the protected branch.
- developersCanMerge: Whether developers can merge into the protected branch.
For your developer
Arazzo workflow gitlab:create-and-protect-branch, 2 operations: postApiV4ProjectsIdRepositoryBranches → putApiV4ProjectsIdRepositoryBranchesBranchProtect. Specs on APIs.io.