Actions66
- Branch Actions
- File Actions
- Group Actions
- Issue Actions
- Merge Request Actions
- Pipeline Actions
- Project Actions
- Raw API Actions
- Release Actions
- Tag Actions
Overview
This node operation fetches the list of changes (diffs) associated with a specific merge request in a GitLab project. It is useful when you want to programmatically retrieve detailed information about what code modifications a merge request introduces, such as added, modified, or deleted lines/files.
Common scenarios include:
- Automating code review workflows by analyzing merge request changes.
- Integrating GitLab merge request diffs into external reporting or monitoring tools.
- Triggering downstream processes based on specific file changes in a merge request.
For example, you could use this node to get all changed files and their diffs for a merge request before running automated tests or notifying reviewers.
Properties
| Name | Meaning |
|---|---|
| Authentication | Select whether to use saved credentials ("Credential") or provide custom connection details ("Custom"). |
| GitLab Server | Base URL of your GitLab instance, e.g., "https://gitlab.com". Used only if "Custom" authentication is selected. |
| Access Token | Personal access token with API permissions. Used only if "Custom" authentication is selected. |
| Project Owner | Namespace or owner of the project. Ignored if "Project ID" is set. Used only if "Custom" authentication is selected. |
| Project Name | Project slug or name. Ignored if "Project ID" is set. Used only if "Custom" authentication is selected. |
| Project ID | Numeric project ID. Takes precedence over owner and name if provided. Used only if "Custom" authentication is selected. |
| Merge Request IID | The internal ID number of the merge request to fetch changes for. Must be a positive integer. |
Output
The output JSON contains an array of objects representing the changes (diffs) in the specified merge request. Each object typically includes details such as:
- File paths affected.
- Diff content showing additions, deletions, and modifications.
- Metadata about each change (e.g., new file, deleted file).
This data structure allows further processing or inspection of the exact code differences introduced by the merge request.
The node does not output binary data for this operation.
Dependencies
- Requires access to a GitLab instance via its REST API.
- Needs either saved credentials or custom authentication parameters including a personal access token with appropriate API permissions.
- No additional external services are required beyond GitLab.
Troubleshooting
- Invalid or missing Merge Request IID: Ensure the merge request IID is provided and is a positive integer.
- Authentication errors: Verify that the personal access token or saved credentials have sufficient permissions to access the project and merge request.
- Project identification issues: If using custom authentication, ensure that either the numeric project ID is set or both project owner and project name are correctly specified.
- API rate limits or network issues: Check connectivity to the GitLab server and confirm that API rate limits have not been exceeded.
Common error messages will relate to invalid parameters, unauthorized access, or resource not found. Resolving these usually involves correcting input parameters or updating credentials.