capabilities.work

Prune Stale Merged Branches

A 2-step recipe with GitLab. We can help you get access.

Recipe · 2 steps

Prune Stale Merged Branches

with GitLab · Software Construction Management
Works with AI assistants

Report branch candidates and then delete all merged branches.

  1. List branches matching the optional search term for visibility.
  2. Trigger the asynchronous bulk delete of all merged branches in the project.
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.
  • search: Optional search filter for the branch survey.
For your developer

Arazzo workflow gitlab:prune-stale-branches, 2 operations: getApiV4ProjectsIdRepositoryBranches → deleteApiV4ProjectsIdRepositoryMergedBranches. Specs on APIs.io.