GitLab API icon

GitLab API

Gitlab

Actions917

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. For example, it can be used to fetch the raw diff data to display in a custom dashboard or to trigger automated testing based on code changes.

Use Case Examples

  1. Fetch raw diffs of a merge request to display in a custom code review tool.
  2. Automate retrieval of merge request diffs to analyze code changes before deployment.

Properties

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

Output

JSON

  • raw_diffs - The raw diff data of the specified merge request.

Dependencies

  • GitLab API authentication token or API key

Troubleshooting

  • Ensure the project ID and merge request IID are correctly specified and URL-encoded if necessary.
  • Verify that the authentication token has sufficient permissions to access the project's merge requests.
  • Check the base URL if using a self-hosted GitLab instance instead of gitlab.com.
  • Common errors include 404 Not Found if the project or merge request does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion