GitLab API

GitlabTool

Actions1000

Overview

This node operation publishes a draft note on a specific merge request within a project in GitLab. It is useful for automating the process of finalizing and making draft comments visible in merge requests during code review workflows. For example, a user can automate publishing draft notes after certain checks or approvals are met.

Use Case Examples

  1. Automatically publish draft notes on a merge request after CI tests pass.
  2. Batch publish multiple draft notes on merge requests for project review.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
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 PUT is used for this operation.
Path Parameters Parameters required in the request path to identify the project, merge request, and draft note to publish.

Output

JSON

  • id - The ID of the published note.
  • body - The content of the published note.
  • author
    • id - The ID of the author of the note.
  • created_at - Timestamp when the note was created.
  • updated_at - Timestamp when the note was last updated.

Dependencies

  • GitLab API authentication token

Troubleshooting

  • Ensure the project ID, merge request IID, and draft note ID are correct and exist in the GitLab instance.
  • Verify that the authentication token has sufficient permissions to publish draft notes on merge requests.
  • Check the base URL is correctly set to the GitLab instance being used.

Discussion