GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves the raw diffs of a specific merge request from a GitLab project using the GitLab API. It is useful for developers and DevOps engineers who want to programmatically access the detailed changes introduced by a merge request for code review, auditing, or integration into CI/CD pipelines.

Use Case Examples

  1. Fetch raw diffs of a merge request to display code changes in a custom dashboard.
  2. Automate code review processes by analyzing merge request diffs.
  3. Integrate merge request diffs into external tools for compliance or auditing.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method used for the API request, default is GET.
Path Parameters Parameters required in the API path to specify the project and merge request.

Output

JSON

  • raw_diffs - The raw diff data of the specified merge request, showing the code changes.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and merge request IID are correctly specified and URL-encoded if necessary.
  • Verify that the GitLab API key has sufficient permissions to access the project's merge requests.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 404 Not Found if the project or merge request does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion