capabilities.work

Create a Feature Branch from the Default Branch

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

Recipe · 2 steps

Create a Feature Branch from the Default Branch

with GitLab · Software Construction Management
Works with AI assistants

Create a new branch in a project from the default branch ref.

  1. List the repository branches so the default branch and its current commit can be identified before branching.
  2. Create the new branch referencing the supplied ref (defaulting to the project default branch) so it starts from the latest commit.
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.
  • newBranch: The name of the new branch to create (e.g. feature/login).
  • ref: Optional ref to branch from; defaults to the default branch name.
For your developer

Arazzo workflow gitlab:create-branch-from-default, 2 operations: getApiV4ProjectsIdRepositoryBranches → postApiV4ProjectsIdRepositoryBranches. Specs on APIs.io.