GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node interacts with the GitLab API to retrieve merge requests using the GitLab API v4 endpoint. It allows users to query merge requests with a wide range of filtering options such as author, assignee, reviewer, labels, milestone, state, creation and update times, and more. This node is useful for automating workflows that involve monitoring or managing merge requests in GitLab projects, such as generating reports, triggering actions based on merge request status, or integrating GitLab data with other systems.

Use Case Examples

  1. Retrieve all open merge requests assigned to a specific user.
  2. Fetch merge requests created by a particular author within a date range.
  3. List merge requests filtered by labels and milestone for project management purposes.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance to connect to, default is https://gitlab.com.
Method HTTP method to use for the API request, default is GET.
Query Parameters Collection of query parameters to filter and customize the merge requests retrieval, including author_id, assignee_id, labels, state, created_after, updated_before, and many others.

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 - User who created the merge request
  • assignee - User assigned to the merge request
  • reviewers - Users assigned as reviewers of the merge request
  • merge_status - Current merge status of the merge request

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the GitLab API key credential is correctly configured and has sufficient permissions to access merge requests.
  • Verify the baseUrl is correct and accessible, especially if using a self-hosted GitLab instance.
  • Check that query parameters are valid and correctly formatted to avoid API errors.
  • Common error messages include authentication failures (401 Unauthorized), invalid parameters (400 Bad Request), and permission denied (403 Forbidden). Resolving these typically involves verifying credentials, parameter values, and user permissions.

Links

Discussion