GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation deletes a specific draft note from a merge request within a project on GitLab. 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 when certain conditions are met, such as after approval or when a related issue is closed.
  2. Integrate with CI/CD pipelines to manage merge request comments by removing draft notes that are no longer needed.

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, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, default is GET but DELETE is used for this operation.
Path Parameters Parameters required in the 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 after the delete operation.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure that the project ID, merge request IID, and draft note ID are correctly specified 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 ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages include 404 Not Found if the draft note or merge request does not exist, and 403 Forbidden if the user lacks permission to delete the draft note.

Links

Discussion