GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves the merge reference information for a specific merge request in a GitLab project using the GitLab API v4. It is useful for developers and DevOps engineers who need to programmatically access details about the merge reference of a merge request, such as for automation scripts, CI/CD pipelines, or integration with other tools.

Use Case Examples

  1. Fetch the merge reference of a merge request to verify the commit SHA before merging.
  2. Use the merge reference data to trigger downstream processes in a CI/CD pipeline based on merge request status.

Properties

Name Meaning
Skip Authentication Option to skip authentication for 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 to use for the API request, default is GET.
Path Parameters Parameters required in the API path to identify the project and merge request.

Output

JSON

  • merge_ref - The merge reference information of the specified merge request, typically including commit SHA and branch details.

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 and merge request data.
  • Check the base URL 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