GitLab API

GitlabTool

Actions905

Overview

This node operation resets the approvals on a specific merge request within a GitLab project. It is useful in scenarios where you want to clear all existing approvals on a merge request, for example, if the merge request has changed significantly and requires fresh approvals from reviewers.

Use Case Examples

  1. Reset approvals on a merge request after significant code changes to ensure all reviewers re-approve.
  2. Clear approvals to restart the review process for a merge request.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, default is PUT.
Path Parameters Parameters for the API path, including the project ID and the merge request IID to identify the merge request to reset approvals for.

Output

JSON

  • statusCode - HTTP status code of the response indicating success or failure.
  • body - The response body from the GitLab API, typically empty or containing confirmation of the reset action.

Dependencies

  • GitLab API authentication token or API key credential

Troubleshooting

  • Ensure the project ID and merge request IID are correct and exist in the GitLab instance.
  • Verify that the API token has sufficient permissions to reset approvals on merge requests.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include 404 Not Found if the project or merge request does not exist, and 403 Forbidden if the API token lacks permissions.

Links

Discussion