GitLab API icon

GitLab API

Gitlab

Actions917

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 note details for code review automation or project management integration.

Use Case Examples

  1. Fetch a draft note by specifying the project ID, merge request IID, and draft note ID to review comments before merging.
  2. Automate retrieval of draft notes to integrate with external issue tracking or notification systems.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated API calls.
Authentication Type of authentication used, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the API request, default is GET.
Path Parameters Parameters required in the API 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 information of the draft note in the merge request.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

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

Links

Discussion