GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation cancels the automatic merge of a specified merge request in a GitLab project when the pipeline succeeds. It is useful in scenarios where a merge request has been set to merge automatically after a successful pipeline, but the user decides to cancel this automatic merge before it happens. For example, if new changes need to be added or the merge is no longer desired, this operation can be used to stop the automatic merge process.

Use Case Examples

  1. Cancel the automatic merge of a merge request in a GitLab project identified by project ID and merge request IID.
  2. Use this operation to manage merge requests in CI/CD workflows where automatic merging is controlled based on pipeline success.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request (boolean). Default is false.
Authentication Type of authentication used, default is GitLab API authentication.
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: 'id' (project ID or URL-encoded path) and 'merge_request_iid' (internal ID of the merge request).

Output

JSON

  • id - The ID or URL-encoded path of the project.
  • merge_request_iid - The internal ID of the merge request.
  • status - Status of the cancel merge operation response from GitLab API.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID and merge request IID are correct and exist in the GitLab instance.
  • Verify that the authentication credentials are valid and have sufficient permissions to modify merge requests.
  • If the operation fails, check if the merge request is already merged or the pipeline status does not allow canceling the automatic merge.

Links

Discussion