GitLab API

GitlabTool

Actions1000

Overview

This node operation resets the approvals for a specific merge request in a GitLab project. It is useful in scenarios where you want to clear all existing approvals on a merge request, for example, when significant changes have been made and the approval process needs to start over. Practical examples include automating the reset of approvals after a major update to the merge request or integrating this step into a CI/CD pipeline to enforce fresh reviews.

Use Case Examples

  1. Reset approvals on a merge request after code changes to ensure all reviewers re-approve.
  2. Automate the approval reset process as part of a project management workflow in GitLab.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication The authentication method used for the request, typically a GitLab API key.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, default is GET but for this operation it is PUT.
Path Parameters Parameters required in the URL path to identify the project and merge request.

Output

JSON

  • id - The ID of the GitLab project.
  • merge_request_iid - The internal ID of the merge request.
  • status - The status of the reset approvals operation, typically indicating success or failure.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and merge request IID are correctly provided and exist in the GitLab instance.
  • Verify that the API key has sufficient permissions to reset approvals on the merge request.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include authentication failures, invalid project or merge request IDs, and insufficient permissions. Resolving these involves verifying credentials, input parameters, and user permissions.

Links

Discussion