GitLab · Arazzo Workflow

GitLab Create a Feature Branch from the Default Branch

Version 1.0.0

Resolve the default branch tip and cut a new feature branch from it.

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

Provider

gitlab

Workflows

create-branch-from-default
Create a new branch in a project from the default branch ref.
Lists the project's repository branches to find the default branch, then creates a new branch that references the default branch so the new branch inherits the latest commit.
2 steps inputs: newBranch, privateToken, projectId, ref outputs: createdBranch, createdBranchUrl
1
listBranches
List the repository branches so the default branch and its current commit can be identified before branching.
2
createBranch
Create the new branch referencing the supplied ref (defaulting to the project default branch) so it starts from the latest commit.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: GitLab Create a Feature Branch from the Default Branch
  summary: Resolve the default branch tip and cut a new feature branch from it.
  description: >-
    A foundational GitLab repository flow. The workflow reads the project's
    branch list to discover the default branch and its latest commit, then
    creates a new branch pointed at that same ref so feature work starts from a
    known-good base. 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: create-branch-from-default
  summary: Create a new branch in a project from the default branch ref.
  description: >-
    Lists the project's repository branches to find the default branch, then
    creates a new branch that references the default branch so the new branch
    inherits the latest commit.
  inputs:
    type: object
    required:
    - privateToken
    - projectId
    - newBranch
    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.
      newBranch:
        type: string
        description: The name of the new branch to create (e.g. feature/login).
      ref:
        type: string
        description: Optional ref to branch from; defaults to the default branch name.
        default: main
  steps:
  - stepId: listBranches
    description: >-
      List the repository branches so the default branch and its current commit
      can be identified before branching.
    operationId: getApiV4ProjectsIdRepositoryBranches
    parameters:
    - name: Private-Token
      in: header
      value: $inputs.privateToken
    - name: id
      in: path
      value: $inputs.projectId
    - name: per_page
      in: query
      value: 100
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      defaultBranchName: $response.body#/0/name
      defaultBranchCommit: $response.body#/0/commit/id
  - stepId: createBranch
    description: >-
      Create the new branch referencing the supplied ref (defaulting to the
      project default branch) so it starts from the latest commit.
    operationId: postApiV4ProjectsIdRepositoryBranches
    parameters:
    - name: Private-Token
      in: header
      value: $inputs.privateToken
    - name: id
      in: path
      value: $inputs.projectId
    - name: branch
      in: query
      value: $inputs.newBranch
    - name: ref
      in: query
      value: $inputs.ref
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      branchName: $response.body#/name
      branchWebUrl: $response.body#/web_url
      merged: $response.body#/merged
  outputs:
    createdBranch: $steps.createBranch.outputs.branchName
    createdBranchUrl: $steps.createBranch.outputs.branchWebUrl

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-create-branch-from-default-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.