This action requires a token for the user on whose behalf it will run.

CreateGitlabBranches — creates new branches in the target repository.

Request example

project_id: '0'
branches:
  - branch: new-branch
    ref: main

Request specification

NameRequiredDescription
project_idYesIdentifier of the project in which to create the branches
branchesYesList of branches to create
branches.branchYesName of the new branch
branches.refYesName of an existing branch or a commit SHA

Note

The action performs a POST request to the URL: /api/v4/projects/:id/repository/branches. Upon successful creation, GitLab returns information about the created branches.