GitLab API icon

GitLab API

Gitlab

Actions917

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, reviewer, labels, state, creation and update dates, and more. This is useful for project managers, developers, and DevOps teams who want to automate the monitoring and management of merge requests in their GitLab projects.

Use Case Examples

  1. Fetch all merge requests for a project to review pending code changes.
  2. Filter merge requests assigned to a specific user to track their workload.
  3. Retrieve merge requests created after a certain date to monitor recent activity.

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 The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the API request, default is GET.
Query Parameters Collection of optional query parameters to filter and customize the merge requests returned by the API.
Path Parameters Path parameter specifying the project ID or URL-encoded path to identify the project for which to retrieve merge requests.

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

Troubleshooting

  • Ensure the project ID or URL-encoded path is correct to avoid 404 errors.
  • Verify that the API key credential has sufficient permissions to access merge requests.
  • Check that query parameters are correctly formatted and valid according to GitLab API documentation.
  • If authentication is skipped, ensure the GitLab instance allows unauthenticated access to merge requests.

Links

Discussion