GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves comments on a specific commit in a GitLab project repository using the GitLab API v4. It is useful for scenarios where users want to fetch discussions or feedback related to a particular commit identified by its SHA or branch/tag name. 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 project to analyze feedback.
  2. Retrieve paginated commit comments to display in a custom dashboard or report.

Properties

Name Meaning
Skip Authentication Option to skip API authentication for the request.
Authentication Type of authentication used for the API request, defaulting to GitLab API key.
baseUrl Base URL of the GitLab instance, default is 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 - Text content of the comment
  • author
    • id - ID of the comment author
    • username - Username of the comment author
  • created_at - Timestamp when the comment was created
  • updated_at - Timestamp when the comment was last updated
  • commit_id - SHA of the commit the comment is associated with
  • line_code - Code line identifier the comment refers to
  • position
    • new_path - File path in the repository related to the comment
    • new_line - Line number in the file related to the comment

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and commit SHA are correctly provided; otherwise, the API will return errors.
  • Check that the GitLab API key credential is valid and has sufficient permissions to access the repository and commit comments.
  • Pagination parameters (page, per_page) must be integers; invalid values may cause request failures.

Links

Discussion