GitLab API

GitlabTool

Actions905

Overview

This node operation publishes a draft note on a merge request within a specific project in GitLab. It is useful for developers and teams who want to programmatically finalize and publish draft comments on merge requests as part of their CI/CD workflows or automation scripts. For example, after reviewing code changes, a user can automate the publishing of draft notes to make comments visible to other collaborators.

Use Case Examples

  1. Publishing a draft note on a merge request to finalize code review comments.
  2. Automating the process of making draft comments public on GitLab merge requests during a CI pipeline.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request.
Authentication The authentication method used for the request, typically an API key credential for GitLab.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method used for the request, which is PUT for this operation.
Path Parameters The path parameters required 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 - The timestamp when the note was created.
  • updated_at - The 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 API token used has sufficient permissions to publish draft notes on merge requests.
  • Check the base URL to ensure it points to the correct GitLab instance if using a self-hosted GitLab server.

Links

Discussion