GitLab · Arazzo Workflow
GitLab Clean Up a Merged Branch
Version 1.0.0
Verify a branch has been merged, then unprotect and delete it.
Provider
Workflows
cleanup-merged-branch
Delete a branch only after confirming it has been merged.
Reads the branch to confirm its merged flag, branches on the result, and for merged branches unprotects then deletes them.
1
getBranch
getApiV4ProjectsIdRepositoryBranchesBranch
Read the branch and capture whether it has been merged.
2
unprotectBranch
putApiV4ProjectsIdRepositoryBranchesBranchUnprotect
Unprotect the branch so it can be deleted.
3
deleteBranch
deleteApiV4ProjectsIdRepositoryBranchesBranch
Delete the now-unprotected, merged branch.