GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves merge requests associated with a specific commit in a GitLab project repository. It is useful for developers and project managers who want to track which merge requests include a particular commit, aiding in code review, auditing, and project management workflows. For example, it can be used to fetch all merge requests that contain a bug fix commit to verify the changes before deployment.

Use Case Examples

  1. Fetch merge requests for a commit SHA in a project to review related code changes.
  2. List merge requests for a branch or tag to understand the impact of recent commits.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, defaulting to GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Parameter Schema Defines required and optional parameters for the API call, including project ID, commit SHA, pagination page, and items per page.
Query Parameters Optional query parameters for pagination: page number and items per page.
Path Parameters Required path parameters: project ID and commit SHA or branch/tag name.

Output

JSON

  • merge_requests - List of merge requests associated with the specified commit.
  • pagination
    • page - Current page number of the results.
    • per_page - Number of items per page in the results.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and commit SHA are correctly URL-encoded to avoid 404 errors.
  • Authentication errors may occur if the API key is missing or invalid; verify credentials are set correctly.
  • Pagination parameters must be integers; invalid values may cause request failures.

Links

Discussion