GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves merge requests for a specified GitLab group using the GitLab API v4. It allows users to filter and query merge requests based on various criteria such as author, assignee, reviewer, labels, milestone, state, creation and update times, and more. This operation is useful for project managers, developers, and DevOps teams who want to monitor and manage merge requests within a GitLab group programmatically.

Use Case Examples

  1. Fetch all merge requests for a GitLab group to review pending code changes.
  2. Filter merge requests by author or assignee to track contributions from specific team members.
  3. Retrieve merge requests created or updated within a certain date range for reporting purposes.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the API request (GET, POST, PUT, DELETE, HEAD, PATCH).
Parameter Schema Defines the parameters accepted by the API endpoint, including path and query parameters for filtering merge requests.
Query Parameters Collection of optional query parameters to filter and customize the merge requests returned by the API.
Path Parameters Path parameters required by the API endpoint, specifically the group ID or URL-encoded path.

Output

JSON

  • id - Unique identifier of the merge request.
  • iid - Internal ID of the merge request within the group.
  • title - Title of the merge request.
  • description - Description of the merge request.
  • state - Current state of the merge request (e.g., opened, closed, merged).
  • author
    • id - User ID of the author who created the merge request.
  • assignee
    • id - User ID of the assignee for the merge request.
  • labels - Labels associated with the merge request.
  • 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.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the group ID or URL-encoded path is correctly provided in the path parameters to avoid 404 errors.
  • Verify that the API token or credentials have sufficient permissions to access the group's merge requests.
  • Check the format and validity of query parameters, especially date-time fields, to prevent request errors.

Links

Discussion