GitLab API icon

GitLab API

Gitlab

Actions1062

Commits → getApiV4ProjectsIdRepositoryCommitsShaComments

AI-generated

Summary

Retrieve comments for a specific commit in a GitLab project repository by specifying the project ID or path and the commit SHA (or branch/tag name).

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project.
  • sha (required) — The commit SHA, or the name of a branch or tag to identify the commit.
  • page — Page number for paginated results (default: 1).
  • per_page — Number of comments to return per page (default: 20).
  • skipAuthentication — Boolean to skip authentication (default: false).
  • baseUrl — The base URL of the GitLab instance (default: https://gitlab.com).

Output shape

a paginated list of commit comment objects returned by the GitLab API

The comments are subject to pagination controlled by 'page' and 'per_page' query parameters. Authentication is required unless skipped via 'skipAuthentication'.

Examples

Example 1: Get comments for commit SHA 'abc123' in project with ID 42.

Set 'id' to '42', 'sha' to 'abc123', optionally set pagination parameters, then execute the GET request to retrieve commit comments.

Links

Discussion