GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves a specific draft note from a merge request within a project on GitLab using the GitLab API v4. It is useful for scenarios where you need to access detailed information about draft notes associated with merge requests, such as reviewing or processing comments before they are finalized. For example, it can be used in automated workflows to fetch draft notes for code review automation or integration with other project management tools.

Use Case Examples

  1. Fetch a draft note by providing the project ID, merge request IID, and draft note ID to review comments before merging.
  2. Automate retrieval of draft notes to analyze feedback on merge requests programmatically.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated access.
Authentication Type of authentication used, default is GitLab API key authentication.
baseUrl Base URL of the GitLab instance, defaulting to 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, merge request, and draft note.

Output

JSON

  • id - The unique identifier of the draft note.
  • body - The content of the draft note.
  • author
    • id - The ID of the author who created the draft note.
  • created_at - Timestamp when the draft note was created.
  • updated_at - Timestamp when the draft note was last updated.
  • position - The position in the code where the draft note was made.
  • resolved - Indicates if the draft note has been resolved.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID, merge request IID, and draft note ID are correct and exist in the GitLab instance.
  • Verify that the API key credential has sufficient permissions to access the project and merge request data.
  • If skipping authentication, confirm that the GitLab instance allows unauthenticated access to draft notes.
  • Common error messages include 404 Not Found if the draft note does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion