GitLab API

GitlabTool

Actions1000

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, dates, and more. This 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. 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 (opened, closed, merged) to generate status reports.

Properties

Name Meaning
Skip Authentication Option to skip authentication for 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).
Query Parameters Collection of optional filters and parameters to refine the merge requests returned, such as author_id, assignee_id, labels, state, created_after, updated_before, and many others.
Path Parameters Path parameter 'id' specifying the ID or URL-encoded path of the GitLab project to query merge requests for.

Output

JSON

  • merge_requests - Array of merge request objects returned from the GitLab API, containing details about each merge request such as ID, title, state, author, assignee, labels, milestones, and timestamps.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID provided in the path parameter is correct and accessible with the provided authentication.
  • Verify that the authentication token has sufficient permissions to read merge requests from the project.
  • Check that the baseUrl is correctly set to the GitLab instance URL if using a self-hosted GitLab.
  • If filtering by parameters like author_id or labels, ensure the values are valid and exist in the project context.
  • Handle API rate limits or network errors gracefully by implementing retries or error handling in the workflow.

Links

Discussion