| title | Issue Comments | GitHub API |
|---|
- TOC {:toc}
The Issue Comments API supports listing, viewing, editing, and creating comments on issues and pull requests.
Issue Comments use these custom media types. You can read more about the use of media types in the API here.
GET /repos/:owner/:repo/issues/:number/comments
<%= headers 200, :pagination => default_pagination_rels %> <%= json(:issue_comment) { |h| [h] } %>
GET /repos/:owner/:repo/issues/comments
By default, Issue Comments are ordered by ascending ID.
| Name | Type | Description |
|---|---|---|
sort |
string |
Either created or updated. Default: created |
direction |
string |
Either asc or desc. Ignored without the sort parameter. |
since |
string |
Only comments updated at or after this time are returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
<%= headers 200 %> <%= json(:issue_comment) { |h| [h] } %>
GET /repos/:owner/:repo/issues/comments/:id
<%= headers 200, :pagination => default_pagination_rels %> <%= json :issue_comment %>
POST /repos/:owner/:repo/issues/:number/comments
| Name | Type | Description |
|---|---|---|
body |
string |
Required. The contents of the comment. |
<%= json :body => "Me too" %>
<%= headers 201, :Location => get_resource(:issue_comment)['url'] %> <%= json :issue_comment %>
PATCH /repos/:owner/:repo/issues/comments/:id
| Name | Type | Description |
|---|---|---|
body |
string |
Required. The contents of the comment. |
<%= json :body => "Me too" %>
<%= headers 200 %> <%= json :issue_comment %>
DELETE /repos/:owner/:repo/issues/comments/:id
<%= headers 204 %>
These are the supported media types for issue comments. You can read more about the use of media types in the API here.
application/vnd.github.VERSION.raw+json
application/vnd.github.VERSION.text+json
application/vnd.github.VERSION.html+json
application/vnd.github.VERSION.full+json