Actions18
- Branch Actions
- File Actions
- Issue Actions
- Merge Request Actions
- Pipeline Actions
- Raw API Actions
Overview
This node extends GitLab API functionality by allowing users to manage various GitLab resources such as branches, files, issues, merge requests, pipelines, and raw API calls. Specifically for the Branch - Create operation, it enables creating a new branch in a GitLab repository based on an existing branch or commit reference.
Typical use cases include automating branch creation workflows in CI/CD pipelines, setting up feature branches programmatically, or integrating GitLab branch management into broader automation scenarios. For example, you might create a new feature branch named feature/login from the main branch automatically when a new task is created in your project management tool.
Properties
| Name | Meaning |
|---|---|
| Branch Name | The name of the new branch to create, e.g., feature/login. |
| Ref | The existing branch or commit SHA from which to create the new branch, e.g., main. |
Output
The node outputs JSON data representing the newly created branch object returned by the GitLab API. This typically includes details such as the branch name, commit information, and related metadata.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential with access to the target GitLab project.
- The credential must provide either a project ID or a combination of project owner and project name to identify the repository.
- The node uses internal helper functions to make authenticated HTTP requests to the GitLab API.
Troubleshooting
Common Issues:
- Invalid or missing API credentials will cause authentication failures.
- Specifying a non-existent ref (branch or commit SHA) will result in an error from GitLab.
- Attempting to create a branch that already exists will cause the API to reject the request.
Error Messages:
"Unknown resource: branch": Occurs if the resource parameter is incorrectly set; ensure "Branch" is selected."The 'oldLine' parameter must be a non-negative number.": Not relevant for branch creation but may appear if other operations are misconfigured.- API errors from GitLab will be passed through; check the message for details like permission denied or invalid ref.
Resolution Tips:
- Verify API credentials and permissions.
- Confirm the ref exists in the repository before creating a branch from it.
- Use unique branch names to avoid conflicts.