GitLab API

GitlabTool

Actions1000

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 or cleanup process. For example, it can be used in CI/CD pipelines to ensure that outdated or irrelevant draft notes are deleted before merging code changes.

Use Case Examples

  1. Automatically delete draft notes from a merge request after a review is completed.
  2. Clean up draft notes in bulk for multiple merge requests in a project.

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, defaulting to GET but can be set to DELETE for this operation.
Path Parameters Parameters required in the URL path to identify the project, merge request, and draft note to delete.

Output

JSON

  • statusCode - The HTTP status code returned by the API indicating the result of the delete operation.
  • responseBody - The body of the response from the API, which may contain confirmation or error details.

Dependencies

  • GitLab API authentication credential

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.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • If the API returns an error, review the status code and response body for details on the failure.

Links

Discussion