GitLab API

GitlabTool

Actions905

Overview

This node operation allows users to create draft notes on a specific merge request within a GitLab project. It is useful for adding comments or feedback in draft form before finalizing them on a merge request. Practical scenarios include code review processes where reviewers want to leave preliminary comments that can be edited or deleted before being published.

Use Case Examples

  1. Adding a draft comment to a merge request to suggest code improvements.
  2. Leaving feedback on a merge request that can be reviewed and finalized later.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, default is GitLab API key.
baseUrl The base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Path Parameters Parameters required in the URL path to identify the project and merge request.

Output

JSON

  • id - The unique identifier of the created draft note.
  • body - The content of the draft note.
  • author
    • id - The ID of the user who created the draft note.
  • created_at - Timestamp when the draft note was created.
  • updated_at - Timestamp when the draft note was last updated.

Dependencies

  • GitLab API key credential for authentication.

Troubleshooting

  • Ensure the project ID and merge request IID are correct and exist in the GitLab instance.
  • Verify that the authentication credentials are valid and have permission to create draft notes on the specified project and merge request.
  • Check the request body schema to ensure the draft note content is properly formatted and included.
  • Common error messages may include 401 Unauthorized (invalid credentials), 404 Not Found (invalid project or merge request ID), and 400 Bad Request (invalid request body).

Links

Discussion