Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commitd0847c2

Browse files
committed
Merge pull request#79 from bgrainger/comments
Move Repo Comments API to its own page.
2 parents3b06725 +2a4583d commitd0847c2

File tree

3 files changed

+112
-106
lines changed

3 files changed

+112
-106
lines changed

‎content/v3/repos/comments.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
---
2+
title:Repo Comments | GitHub API
3+
---
4+
5+
#Repo Comments API
6+
7+
##List commit comments for a repository
8+
9+
Commit Comments leverage[these](#custom-mime-types) custom mime types. You can
10+
read more about the use of mime types in the API[here](/v3/mime/).
11+
12+
Comments are ordered by ascending ID.
13+
14+
GET /repos/:user/:repo/comments
15+
16+
###Response
17+
18+
<%= headers 200 %>
19+
<%= json(:commit_comment) { |h|[h] } %>
20+
21+
##List comments for a single commit
22+
23+
GET /repos/:user/:repo/commits/:sha/comments
24+
25+
###Response
26+
27+
<%= headers 200 %>
28+
<%= json(:commit_comment) %>
29+
30+
##Create a commit comment
31+
32+
POST /repos/:user/:repo/commits/:sha/comments
33+
34+
###Input
35+
36+
body
37+
:_Required_**string**
38+
39+
commit_id
40+
:_Required_**string** - Sha of the commit to comment on.
41+
42+
line
43+
:_Required_**number** - Line number in the file to comment on.
44+
45+
path
46+
:_Required_**string** - Relative path of the file to comment on.
47+
48+
position
49+
:_Required_**number** - Line index in the diff to comment on.
50+
51+
####Example
52+
53+
<%= json\
54+
:body => 'Nice change',
55+
:commit_id => '6dcb09b5b57875f334f61aebed695e2e4193db5e',
56+
:line => 1,
57+
:path => 'file1.txt',
58+
:position => 4
59+
%>
60+
61+
###Response
62+
63+
<%= headers 201,:Location => "https://api.github.com/user/repo/comments/1" %>
64+
<%= json:commit_comment %>
65+
66+
##Get a single commit comment
67+
68+
GET /repos/:user/:repo/comments/:id
69+
70+
###Response
71+
72+
<%= headers 200 %>
73+
<%= json:commit_comment %>
74+
75+
##Update a commit comment
76+
77+
PATCH /repos/:user/:repo/comments/:id
78+
79+
###Input
80+
81+
body
82+
:_Required_**string**
83+
84+
####Example
85+
86+
<%= json\
87+
:body => 'Nice change'
88+
%>
89+
90+
###Response
91+
92+
<%= headers 200 %>
93+
<%= json:commit_comment %>
94+
95+
##Delete a commit comment
96+
97+
DELETE /repos/:user/:repo/comments/:id
98+
99+
###Response
100+
101+
<%= headers 204 %>
102+
103+
##Custom Mime Types
104+
105+
These are the supported mime types for commit comments. You can read more
106+
about the use of mime types in the API[here](/v3/mime/).
107+
108+
application/vnd.github-commitcomment.raw+json
109+
application/vnd.github-commitcomment.text+json
110+
application/vnd.github-commitcomment.html+json
111+
application/vnd.github-commitcomment.full+json

‎content/v3/repos/commits.md

Lines changed: 0 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -33,116 +33,10 @@ will be returned.
3333

3434
Note: Diffs with binary data will have no 'patch' property.
3535

36-
##List commit comments for a repository
37-
38-
Commit Comments leverage[these](#custom-mime-types) custom mime types. You can
39-
read more about the use of mime types in the API[here](/v3/mime/).
40-
41-
Comments are ordered by ascending ID.
42-
43-
GET /repos/:user/:repo/comments
44-
45-
###Response
46-
47-
<%= headers 200 %>
48-
<%= json(:commit_comment) { |h|[h] } %>
49-
50-
##List comments for a single commit
51-
52-
GET /repos/:user/:repo/commits/:sha/comments
53-
54-
###Response
55-
56-
<%= headers 200 %>
57-
<%= json(:commit_comment) %>
58-
59-
##Create a commit comment
60-
61-
POST /repos/:user/:repo/commits/:sha/comments
62-
63-
###Input
64-
65-
body
66-
:_Required_**string**
67-
68-
commit_id
69-
:_Required_**string** - Sha of the commit to comment on.
70-
71-
line
72-
:_Required_**number** - Line number in the file to comment on.
73-
74-
path
75-
:_Required_**string** - Relative path of the file to comment on.
76-
77-
position
78-
:_Required_**number** - Line index in the diff to comment on.
79-
80-
####Example
81-
82-
<%= json\
83-
:body => 'Nice change',
84-
:commit_id => '6dcb09b5b57875f334f61aebed695e2e4193db5e',
85-
:line => 1,
86-
:path => 'file1.txt',
87-
:position => 4
88-
%>
89-
90-
###Response
91-
92-
<%= headers 201,:Location => "https://api.github.com/user/repo/comments/1" %>
93-
<%= json:commit_comment %>
94-
95-
##Get a single commit comment
96-
97-
GET /repos/:user/:repo/comments/:id
98-
99-
###Response
100-
101-
<%= headers 200 %>
102-
<%= json:commit_comment %>
103-
104-
##Update a commit comment
105-
106-
PATCH /repos/:user/:repo/comments/:id
107-
108-
###Input
109-
110-
body
111-
:_Required_**string**
112-
113-
####Example
114-
115-
<%= json\
116-
:body => 'Nice change'
117-
%>
118-
119-
###Response
120-
121-
<%= headers 200 %>
122-
<%= json:commit_comment %>
123-
12436
##Compare two commits
12537

12638
GET /repos/:user/:repo/compare/:base...:head
12739

12840
###Response
12941

13042
<%= json:commit_comparison %>
131-
132-
##Delete a commit comment
133-
134-
DELETE /repos/:user/:repo/comments/:id
135-
136-
###Response
137-
138-
<%= headers 204 %>
139-
140-
##Custom Mime Types
141-
142-
These are the supported mime types for commit comments. You can read more
143-
about the use of mime types in the API[here](/v3/mime/).
144-
145-
application/vnd.github-commitcomment.raw+json
146-
application/vnd.github-commitcomment.text+json
147-
application/vnd.github-commitcomment.html+json
148-
application/vnd.github-commitcomment.full+json

‎layouts/default.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ <h3><a href="#" class="js-expand-btn collapsed">&nbsp;</a><a href="/v3/pulls/">P
8989
<h3><ahref="#"class="js-expand-btn collapsed">&nbsp;</a><ahref="/v3/repos/">Repos</a></h3>
9090
<ulclass="js-guides">
9191
<li><ahref="/v3/repos/collaborators/">Collaborators</a></li>
92+
<li><ahref="/v3/repos/comments/">Comments</a></li>
9293
<li><ahref="/v3/repos/commits/">Commits</a></li>
9394
<li><ahref="/v3/repos/downloads/">Downloads</a></li>
9495
<li><ahref="/v3/repos/forks/">Forks</a></li>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp