GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves merge requests from a specified GitLab project using the GitLab API v4. It allows users to filter and query merge requests based on various parameters such as author, assignee, state, labels, milestones, and more. This is useful for project management, code review automation, and monitoring merge request statuses in GitLab projects.

Use Case Examples

  1. Fetch all merge requests for a project to monitor code review progress.
  2. Retrieve merge requests assigned to a specific user to track their workload.
  3. Filter merge requests by state (e.g., opened, merged) to generate reports or dashboards.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method used for the API request, default is GET.
Query Parameters Collection of optional filters and parameters to customize the merge requests retrieval, such as author_id, assignee_id, state, labels, milestone, created_after, updated_before, and pagination options.
Path Parameters Path parameter specifying the project ID or URL-encoded path to identify the project whose merge requests are being retrieved.

Output

JSON

  • id - Unique identifier of the merge request.
  • iid - Internal ID of the merge request within the project.
  • project_id - ID of the project the merge request belongs to.
  • title - Title of the merge request.
  • description - Description of the merge request.
  • state - 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_at - Timestamp when the merge request was merged, if applicable.
  • labels - Labels associated with the merge request.
  • author - Information about the user who created the merge request.
  • assignee - Information about the user assigned to the merge request.
  • reviewers - List of users assigned as reviewers for the merge request.
  • merge_status - Current merge status of the merge request.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID or URL-encoded path is correct to avoid 404 errors.
  • Verify that the API key has sufficient permissions to access merge requests.
  • Check query parameter values for correctness and compatibility (e.g., mutually exclusive parameters).
  • Handle pagination properly to retrieve all merge requests if there are many.

Links

Discussion