GitLab API

GitlabTool

Actions905

Overview

This node operation deletes a specific draft note from a merge request within a GitLab project. It is useful for automating the management of merge request comments, particularly when draft notes need to be programmatically removed as part of a workflow, such as cleaning up outdated or irrelevant comments before merging code.

Use Case Examples

  1. Automatically delete draft notes from merge requests in a CI/CD pipeline to maintain clean code review comments.
  2. Remove draft notes from merge requests when a related issue is closed or resolved.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request, defaulting to DELETE for this operation.
Path Parameters Parameters required in the API request path to identify the project, merge request, and draft note to delete.

Output

JSON

  • success - Indicates whether the draft note was successfully deleted.
  • statusCode - HTTP status code returned by the API.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID, merge request IID, and draft note ID are correct and exist in the GitLab instance.
  • Verify that the authentication credentials have sufficient permissions to delete draft notes in the specified project and merge request.
  • Check the base URL to confirm it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages include 404 Not Found if the specified draft note or merge request does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion