This repository was archived by the owner on Nov 1, 2017. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork1.1k
Move Repo Comments API to its own page.#79
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
111 changes: 111 additions & 0 deletionscontent/v3/repos/comments.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
--- | ||
title: Repo Comments | GitHub API | ||
--- | ||
# Repo Comments API | ||
## List commit comments for a repository | ||
Commit Comments leverage [these](#custom-mime-types) custom mime types. You can | ||
read more about the use of mime types in the API [here](/v3/mime/). | ||
Comments are ordered by ascending ID. | ||
GET /repos/:user/:repo/comments | ||
### Response | ||
<%= headers 200 %> | ||
<%= json(:commit_comment) { |h| [h] } %> | ||
## List comments for a single commit | ||
GET /repos/:user/:repo/commits/:sha/comments | ||
### Response | ||
<%= headers 200 %> | ||
<%= json(:commit_comment) %> | ||
## Create a commit comment | ||
POST /repos/:user/:repo/commits/:sha/comments | ||
### Input | ||
body | ||
: _Required_ **string** | ||
commit_id | ||
: _Required_ **string** - Sha of the commit to comment on. | ||
line | ||
: _Required_ **number** - Line number in the file to comment on. | ||
path | ||
: _Required_ **string** - Relative path of the file to comment on. | ||
position | ||
: _Required_ **number** - Line index in the diff to comment on. | ||
#### Example | ||
<%= json \ | ||
:body => 'Nice change', | ||
:commit_id => '6dcb09b5b57875f334f61aebed695e2e4193db5e', | ||
:line => 1, | ||
:path => 'file1.txt', | ||
:position => 4 | ||
%> | ||
### Response | ||
<%= headers 201, :Location => "https://api.github.com/user/repo/comments/1" %> | ||
<%= json :commit_comment %> | ||
## Get a single commit comment | ||
GET /repos/:user/:repo/comments/:id | ||
### Response | ||
<%= headers 200 %> | ||
<%= json :commit_comment %> | ||
## Update a commit comment | ||
PATCH /repos/:user/:repo/comments/:id | ||
### Input | ||
body | ||
: _Required_ **string** | ||
#### Example | ||
<%= json \ | ||
:body => 'Nice change' | ||
%> | ||
### Response | ||
<%= headers 200 %> | ||
<%= json :commit_comment %> | ||
## Delete a commit comment | ||
DELETE /repos/:user/:repo/comments/:id | ||
### Response | ||
<%= headers 204 %> | ||
## Custom Mime Types | ||
These are the supported mime types for commit comments. You can read more | ||
about the use of mime types in the API [here](/v3/mime/). | ||
application/vnd.github-commitcomment.raw+json | ||
application/vnd.github-commitcomment.text+json | ||
application/vnd.github-commitcomment.html+json | ||
application/vnd.github-commitcomment.full+json |
106 changes: 0 additions & 106 deletionscontent/v3/repos/commits.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionslayouts/default.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.