GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation allows users to unapprove a specific merge request in a GitLab project. It is useful in scenarios where a previously approved merge request needs to be retracted or reconsidered, such as when additional changes are required or issues are found after approval. For example, a developer or project manager can use this operation to unapprove a merge request to trigger further review or modifications before merging.

Use Case Examples

  1. Unapprove a merge request with ID 123 in project 456 to require additional review.
  2. Revoke approval on a merge request to ensure code quality and compliance before merging.

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 GET but POST is used for this operation.
Path Parameters Parameters required in the request path to identify the project and merge request.

Output

JSON

  • id - The ID of the merge request.
  • project_id - The ID of the project containing the merge request.
  • title - The title of the merge request.
  • state - The current state of the merge request after unapproval.
  • approved_by - List of users who have approved 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 unapprove merge requests.
  • Check the base URL if using a self-hosted GitLab instance to ensure it is correct.
  • Common error: 404 Not Found - The project or merge request does not exist or is inaccessible.
  • Common error: 401 Unauthorized - Authentication failed due to invalid or missing API key.

Links

Discussion