GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API to approve a specific merge request within a project. 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. For example, it can be used to automatically approve merge requests after certain checks pass or to integrate approval processes into broader automation workflows.

Use Case Examples

  1. Automatically approve a merge request after successful build and test stages.
  2. Integrate merge request approvals into a custom project management dashboard.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to GET but can be set to POST, PUT, DELETE, HEAD, or PATCH.
Path Parameters Parameters required in the request path to identify the project and merge request.

Output

JSON

  • approval_status - The status of the merge request approval after the operation.
  • approvals_required - Number of approvals required for the merge request.
  • approvals_left - Number of approvals still needed.
  • approved_by - List of users who have approved the merge request.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID and merge request IID are correctly specified; incorrect values will cause the API call to fail.
  • Authentication errors may occur if the API key or token is invalid or missing; verify credentials are correctly configured.
  • HTTP method must be set to POST for this operation; using other methods may result in errors.

Links

Discussion