Actions18
- Branch Actions
- File Actions
- Issue Actions
- Merge Request Actions
- Pipeline Actions
- Raw API Actions
Overview
This node interacts with GitLab to manage branches within a project repository. Specifically, the "Get" operation for the "Branch" resource retrieves detailed information about a single branch by its name. This is useful when you want to fetch metadata such as the commit SHA, protection status, or other branch details from a GitLab repository.
Common scenarios include:
- Checking if a specific branch exists before performing further actions.
- Retrieving the latest commit information on a branch.
- Automating workflows that depend on branch states or attributes.
Example: You might use this node to get details of the branch named feature/login to verify its existence and retrieve its latest commit SHA before triggering a deployment pipeline.
Properties
| Name | Meaning |
|---|---|
| Branch Name | The exact name of the branch to retrieve, e.g., feature/login. This is required. |
Output
The node outputs JSON data representing the branch details as returned by the GitLab API. This typically includes fields such as:
name: The branch name.commit: Information about the latest commit on the branch (e.g., SHA, author, message).protected: Whether the branch is protected.- Other metadata related to the branch.
The output is an array of JSON objects, each corresponding to one input item processed. There is no binary data output for this operation.
Dependencies
- Requires an API key credential for authenticating with GitLab.
- Needs configuration of the target GitLab project either by project ID or by owner and project name.
- Uses internal helper functions to make authenticated HTTP requests to GitLab's REST API.
Troubleshooting
- Error: Unknown resource — Ensure the "Resource" property is set to "Branch".
- Error: Branch not found — Verify the branch name is correct and exists in the specified GitLab project.
- Authentication errors — Confirm that the API key credential is valid and has sufficient permissions to access the repository.
- Invalid project configuration — Check that the project ID or owner/project name is correctly configured in credentials.