Actions11
Overview
This node interacts with GitLab to manage branches, pipelines, files, issues, and raw API requests. Specifically for the Branch - Get Many operation, it lists multiple branches of a specified GitLab project repository. This is useful when you want to retrieve an overview of all branches in a project, for example, to audit branch names, check active development lines, or automate workflows based on branch data.
Practical examples include:
- Fetching all branches to display in a dashboard.
- Automating branch cleanup by listing branches older than a certain date.
- Integrating branch information into CI/CD pipelines or reporting tools.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method used to authenticate with GitLab: either "Access Token" or "OAuth2". |
| Project Owner | The username or group name that owns the GitLab project (repository). |
| Project Name | The name of the GitLab repository from which to list branches. |
| Return All | Whether to return all branches or limit the number of results. |
| Limit | Maximum number of branches to return if "Return All" is false. Minimum value is 1, default 50. |
Output
The output is a JSON array where each item represents a GitLab branch object as returned by the GitLab API. Each branch object typically includes details such as:
- Branch name
- Commit information (SHA, message, author, etc.)
- Protection status
- Merged status
- Default branch indicator
This allows downstream nodes or workflows to process branch metadata programmatically.
No binary data is output by this operation.
Dependencies
- Requires a valid GitLab API authentication credential, either an access token or OAuth2 token.
- The node uses internal helper functions to make HTTP requests to the GitLab REST API.
- No additional external dependencies beyond standard n8n credentials and network access to GitLab are needed.
Troubleshooting
Common Issues:
- Incorrect project owner or repository name will cause the API request to fail with a "404 Not Found" error.
- Insufficient permissions on the provided token may result in authorization errors.
- Network connectivity issues can cause timeouts or failed requests.
Error Messages:
Unknown resource: branch— indicates the resource parameter was not set correctly; ensure "Branch" is selected.- API errors from GitLab (e.g., 401 Unauthorized, 403 Forbidden) usually mean the authentication token lacks required scopes or is invalid.
Resolutions:
- Verify the project owner and repository names are correct and URL-encoded properly.
- Ensure the API token has read access to the repository.
- Check network connectivity and proxy settings if applicable.