GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes a specific merge request in a GitLab project using the GitLab API. It is useful for automating the management of merge requests, such as removing obsolete or unwanted merge requests programmatically. For example, a user can automate cleanup of merge requests after a feature branch is merged or closed.

Use Case Examples

  1. Automate deletion of a merge request by specifying the project ID and merge request internal ID.
  2. Integrate with CI/CD pipelines to clean up merge requests after deployment.

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 HTTP method to use for the request, default is GET but DELETE is used for this operation.
Path Parameters Parameters required in the URL path to identify the project and merge request to delete.

Output

JSON

  • statusCode - HTTP status code of the delete operation response.
  • body - Response body from the GitLab API after attempting to delete 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 delete merge requests.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include 404 Not Found if the merge request or project does not exist, and 403 Forbidden if the API key lacks delete permissions.

Links

Discussion