GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves comments on a specific commit in a GitLab project repository. It is useful for scenarios where users want to fetch discussions or feedback related to a particular commit identified by its SHA, branch name, or tag. For example, developers or project managers can use this to review commit comments for code review or audit purposes.

Use Case Examples

  1. Fetch all comments on a commit with a specific SHA in a GitLab project.
  2. Paginate through commit comments to analyze feedback over multiple pages.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication Type of authentication used for the API request, 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.
Query Parameters Optional query parameters for pagination such as page number and items per page.
Path Parameters Required path parameters identifying the project and commit SHA.

Output

JSON

  • id - Unique identifier of the comment
  • note - The comment text content
  • author
    • id - ID of the comment author
    • name - Name of the comment author
  • created_at - Timestamp when the comment was created
  • updated_at - Timestamp when the comment was last updated
  • commit_id - The commit SHA the comment is associated with
  • line_code - Code line identifier the comment refers to (if any)

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and commit SHA are correctly provided; otherwise, the API will return an error.
  • Check that the authentication token is valid and has sufficient permissions to access the project repository.
  • Pagination parameters (page, per_page) must be integers; invalid values may cause request failures.
  • If skipping authentication, ensure the GitLab instance allows unauthenticated access to commit comments, which is uncommon.

Links

Discussion