GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation allows users to approve a specific merge request within a GitLab project by sending a POST request to the GitLab API endpoint for approving merge requests. It is useful in automated workflows where merge request approvals need to be programmatically managed, such as in CI/CD pipelines or project management automation.

Use Case Examples

  1. Automatically approve a merge request after successful automated tests.
  2. Integrate merge request approval into a larger deployment workflow.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, default is GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is POST for this operation.
Path Parameters Parameters for the API path including project ID and merge request IID.

Output

JSON

  • id - ID of the approved merge request.
  • iid - Internal ID of the approved merge request.
  • project_id - ID of the project containing the merge request.
  • approved_by - List of users who approved the merge request.
  • approvals_required - Number of approvals required for the merge request.
  • approved_at - Timestamp when the merge request was approved.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and merge request IID are correct and exist in the GitLab instance.
  • Verify that the API key has sufficient permissions to approve merge requests.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error: 401 Unauthorized - indicates authentication failure, check API key and permissions.
  • Common error: 404 Not Found - indicates the project or merge request does not exist or is inaccessible.

Links

Discussion