Sample - GitHub REST API
PATCH/repos/{owner}/{repo}/comments/{comment_id}

Update a commit comment

Updates the contents of a specified commit comment.

This endpoint supports the following custom media types. For more information, see "Media types."

  • application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will include body. This is the default if you do not pass any specific media type.
  • application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will include body_text.
  • application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body's markdown. Response will include body_html.
  • application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will include body, body_text, and body_html.
  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

3 parameters · 1 body field
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
comment_idintegerrequired
The unique identifier of the comment.
bodystringrequired
The contents of the comment

2 status codes
200Response
html_urlstringrequired
urlstringrequired
idintegerrequired
node_idstringrequired
bodystringrequired
pathstringrequired
positionintegerrequired
lineintegerrequired
commit_idstringrequired
userobjectrequired
A GitHub user.
created_atstringrequired
updated_atstringrequired
author_associationstringrequired
How the author is associated with the repository.
Allowed:COLLABORATORCONTRIBUTORFIRST_TIMERFIRST_TIME_CONTRIBUTORMANNEQUINMEMBERNONEOWNER
reactionsobjectoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 404 is returned: Resource not found.