Actions18
- Branch Actions
- File Actions
- Issue Actions
- Merge Request Actions
- Pipeline Actions
- Raw API Actions
Overview
This node enables creating a Merge Request in GitLab. A Merge Request is a request to merge changes from one branch (source) into another branch (target), typically used for code review and collaboration before integrating new features or fixes.
Common scenarios where this node is beneficial include:
- Automating the creation of merge requests as part of CI/CD pipelines.
- Integrating GitLab merge request creation into broader workflows, such as issue tracking or deployment processes.
- Streamlining developer operations by programmatically opening merge requests based on branch updates.
For example, after pushing a feature branch named feature/api, this node can create a merge request targeting the main branch with a descriptive title and optional detailed description.
Properties
| Name | Meaning |
|---|---|
| Source Branch | The name of the source branch containing the changes to be merged, e.g., feature/api. |
| Target Branch | The name of the target branch into which the changes will be merged, e.g., main. |
| Title | The title of the merge request, e.g., Fix login bug. |
| Description | An optional detailed description explaining the purpose or details of the merge request. |
Output
The node outputs an array of JSON objects representing the created merge request(s). Each object contains the data returned by the GitLab API for the merge request, including identifiers, state, author information, timestamps, and other metadata related to the merge request.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the GitLab API.
- Needs configuration of project identification either by numeric project ID or by owner and project name.
- Uses internal helper functions to make authenticated HTTP requests to GitLab's REST API endpoints.
Troubleshooting
- Invalid branch names: Ensure that the source and target branch names exist in the repository; otherwise, the API will return errors.
- Authentication errors: Verify that the provided API key credential has sufficient permissions to create merge requests in the specified project.
- Project identification issues: Confirm that the project ID or owner/project name is correctly configured in credentials; incorrect values will cause resource not found errors.
- Missing required parameters: The node requires
sourceBranch,targetBranch, andtitleproperties; missing any of these will result in validation errors. - API rate limits: If many merge requests are created rapidly, GitLab may throttle requests; handle such errors by retrying after some delay.