GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation deletes a specific merge request from a GitLab project using the GitLab API. It is useful for automating the management of merge requests, such as removing outdated or unwanted merge requests programmatically. For example, a user can integrate this node in a workflow to clean up merge requests after a feature branch is merged or abandoned.

Use Case Examples

  1. Automatically delete a merge request after it has been merged to keep the project clean.
  2. Remove a merge request that was created by mistake or is no longer needed.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication for the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the API request, defaulting to GET but here it will be DELETE for this operation.
Path Parameters Parameters required in the API path to identify the project and the merge request to delete.

Output

JSON

  • success - Indicates whether the merge request was successfully deleted.
  • statusCode - HTTP status code returned by the API after the delete operation.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID and merge request IID are correct and exist in the GitLab instance.
  • Check that the API key has sufficient permissions to delete merge requests.
  • Verify the base URL is correct for the GitLab instance being accessed.
  • Common error: 404 Not Found - The project or merge request does not exist or the user lacks access.
  • Common error: 401 Unauthorized - Authentication failed or API key is invalid.

Links

Discussion