Skip to content

Commit comments

A repository's commit comments, newest first, 30 a page (page from 1).

GET/repos/{owner}/{name}/comments

Each names its commit; one on a line of a file has path and line. Anyone who can read the repository can read them.

Newest first, 30 a page. A comment with path and line is on that line of the file as its commit left it; one without is on the whole commit.

  • Authentication: Optional. Public data can be read without a token; send one to see what is private.
  • MCP tool: repository with action list_commit_comments, and the same inputs
  • Scope: An access token needs repo:read.
Name Type Required Description
owner string Yes The workspace that owns the repository.
name string Yes The repository’s name.
Name Type Required Description
page integer No From 1; 30 comments a page.
curl "https://api.g1t.sh/repos/flagon-io/hello/comments?page=1" \
-H "Authorization: Bearer $G1T_TOKEN"

A successful request answers 200 with:

[
{
"id": "ccm_01m4a2s1b5c7e9g3k6m0p4s8v2",
"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
"commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
"path": null,
"line": null,
"author": "syntaqx",
"body": "Released as v0.4.0.",
"created_at": "2026-10-02T08:30:57.664Z",
"updated_at": null
},
{
"id": "ccm_01m4a2r7k3d9f1h5j8n2q6t0w4",
"repo_id": "rep_01m3m5q6p0e2qaw6mmjahk0qrr",
"commit": "9f2c4e1a7b3d5f60812a4c6e8b0d2f4a6c8e0b13",
"path": "src/main.rs",
"line": 12,
"author": "ana",
"body": "Should an empty name fall back to \"world\"?",
"created_at": "2026-10-01T19:02:11.208Z",
"updated_at": null
}
]

A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.

Status Code When
401 unauthenticated A token is required, or the one sent is not valid.
403 forbidden The token is valid but not allowed to do this, such as a member-only change, or a token without the scope it needs.
404 not_found It does not exist, or you cannot see it.
422 invalid The input is not valid. message says which field and why.