GitLab · Arazzo Workflow

GitLab Prune Stale Merged Branches

Version 1.0.0

Survey the branch list, then bulk-delete all merged branches.

1 workflow 1 source API 1 provider
View Spec View on GitHub CodePlatformSoftware DevelopmentSource ControlArazzoWorkflows

Provider

gitlab

Workflows

prune-stale-branches
Report branch candidates and then delete all merged branches.
Searches the project branches for context, then invokes the bulk delete of all merged branches.
2 steps inputs: privateToken, projectId, search outputs: sampleBranch
1
surveyBranches
List branches matching the optional search term for visibility.
2
deleteMergedBranches
Trigger the asynchronous bulk delete of all merged branches in the project.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: GitLab Prune Stale Merged Branches
  summary: Survey the branch list, then bulk-delete all merged branches.
  description: >-
    A repository tidy-up flow. The workflow first lists branches matching a
    search term to report how many candidates exist, then triggers GitLab's bulk
    delete of all merged branches in the project. Every step spells out its
    request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-4200.40
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-4200.40
      capability_name: Software Construction Management
      spec: gitlab-projects-api-openapi.yml
      confidence: 0.8
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: projectsApi
  url: ../openapi/gitlab-projects-api-openapi.yml
  type: openapi
workflows:
- workflowId: prune-stale-branches
  summary: Report branch candidates and then delete all merged branches.
  description: >-
    Searches the project branches for context, then invokes the bulk delete of
    all merged branches.
  inputs:
    type: object
    required:
    - privateToken
    - projectId
    properties:
      privateToken:
        type: string
        description: GitLab Private-Token used to authenticate the API calls.
      projectId:
        type: string
        description: The ID or URL-encoded path of the project.
      search:
        type: string
        description: Optional search filter for the branch survey.
        default: ''
  steps:
  - stepId: surveyBranches
    description: List branches matching the optional search term for visibility.
    operationId: getApiV4ProjectsIdRepositoryBranches
    parameters:
    - name: Private-Token
      in: header
      value: $inputs.privateToken
    - name: id
      in: path
      value: $inputs.projectId
    - name: search
      in: query
      value: $inputs.search
    - name: per_page
      in: query
      value: 100
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      firstBranchName: $response.body#/0/name
  - stepId: deleteMergedBranches
    description: >-
      Trigger the asynchronous bulk delete of all merged branches in the
      project.
    operationId: deleteApiV4ProjectsIdRepositoryMergedBranches
    parameters:
    - name: Private-Token
      in: header
      value: $inputs.privateToken
    - name: id
      in: path
      value: $inputs.projectId
    successCriteria:
    - condition: $statusCode == 202
  outputs:
    sampleBranch: $steps.surveyBranches.outputs.firstBranchName

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/gitlab-prune-stale-branches-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.