Skip to content

Commit comments

Change a commit comment's text, named by comment_id.

PATCH/repos/{owner}/{name}/comments/{comment_id}

Its author only. Publishes commit_comment.edited.

Its author only.

  • Authentication: Required. Send an access token as Authorization: Bearer.
  • MCP tool: repository with action edit_commit_comment, and the same inputs
  • Scope: An access token needs issues:write.
Name Type Required Description
owner string Yes The workspace that owns the repository.
name string Yes The repository’s name.
comment_id string Yes The commit comment’s id, as list_commit_comments and list_repo_commit_comments give it.

Send a JSON object. Names are snake_case, as in responses; the camelCase spelling is accepted too.

Name Type Required Description
body string Yes The new text, in Markdown.
curl -X PATCH https://api.g1t.sh/repos/flagon-io/hello/comments/ccm_01m4a2r7k3d9f1h5j8n2q6t0w4 \
-H "Authorization: Bearer $G1T_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"body": "Should an empty name fall back to \"world\"? The README says it does."
}'

A successful request answers 200 with:

{
"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\"? The README says it does.",
"created_at": "2026-10-01T19:02:11.208Z",
"updated_at": "2026-10-01T19:05:40.117Z"
}

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.
409 conflict The request conflicts with the current state.
422 invalid The input is not valid. message says which field and why.