GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves merge requests associated with a specific commit in a GitLab project repository. It is useful for developers and DevOps teams who want to track which merge requests include a particular commit, aiding in code review, auditing, and project management. For example, it can be used to fetch all merge requests that contain a commit identified by its SHA or branch/tag name within a given project.

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 to understand ongoing development work.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Query Parameters Optional query parameters for pagination.
Path Parameters Required path parameters to identify the project and commit.

Output

JSON

  • id - The unique identifier of the merge request.
  • title - The title of the merge request.
  • description - The description or details of the merge request.
  • state - The current state of the merge request (e.g., opened, closed, merged).
  • created_at - Timestamp when the merge request was created.
  • updated_at - Timestamp when the merge request was last updated.
  • merged_by - Information about the user who merged the request, if applicable.
  • merge_commit_sha - The SHA of the commit that merged the request.
  • author - Information about the author of the merge request.
  • assignees - List of users assigned to the merge request.
  • source_branch - The source branch of the merge request.
  • target_branch - The target branch of the merge request.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID and commit SHA/path are correctly specified; incorrect values will result in errors or empty responses.
  • Verify that the authentication token has sufficient permissions to access the project's repository and merge requests.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Pagination parameters (page, per_page) should be valid integers; invalid values may cause request failures.

Links

Discussion