GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node interacts with the GitLab API to manage project merge request approvals. Specifically, the operation `postApiV4ProjectsIdMergeRequestsMergeRequestIidApprovals` allows users to approve a merge request within a specified project. This is useful in automated workflows where merge requests need to be programmatically approved as part of CI/CD pipelines or project management automation.

Use Case Examples

  1. Automatically approve a merge request after successful automated tests.
  2. Integrate merge request approvals into a larger DevOps workflow to enforce code review policies.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the 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 request, default is GET but POST is used for this operation.
Path Parameters Parameters to specify the project ID and merge request IID for the approval operation.

Output

JSON

  • approval_status - The status of the merge request approval after the operation.
  • approved_by - Details of users who approved the merge request.
  • approvals_required - Number of approvals required for the merge request.

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; verify API key and permissions.
  • Common error: 404 Not Found - indicates the project or merge request does not exist or is inaccessible.

Links

Discussion