GitLab API

GitlabTool

Actions1000

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 made in a merge request for code review, auditing, or integration purposes.

Use Case Examples

  1. Fetching raw diffs of a merge request to display in a custom dashboard.
  2. Automating code review processes by analyzing merge request diffs.
  3. Integrating GitLab merge request diffs into CI/CD pipelines for validation.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, typically a GitLab API key credential.
baseUrl The base URL of the GitLab instance to connect to, defaulting to https://gitlab.com.
Method The HTTP method to use 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.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and merge request IID are correctly specified and exist in the GitLab instance.
  • Verify that the authentication credentials are valid and have sufficient permissions to access the merge request data.
  • Check the baseUrl if connecting to 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