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

Commit9ecf01e

Browse files
committed
2 parents32834fc +c0a63c3 commit9ecf01e

File tree

6 files changed

+96
-21
lines changed

6 files changed

+96
-21
lines changed

‎content/v3/pulls.md‎

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@ Pull Requests leverage [these](#custom-mime-types) custom mime types. You
88
can read more about the use of mime types in the API
99
[here](/v3/mime/).
1010

11+
##Link Relations
12+
13+
Pull Requests have these possible link relations:
14+
15+
`self`
16+
: The API location of this Pull Request.
17+
18+
`html`
19+
: The HTML location of this Pull Request.
20+
21+
`comments`
22+
: The API location of this Pull Request's Issue comments.
23+
24+
`review_comments`
25+
: The API location of this Pull Request's Review comments.
26+
1127
##List pull requests
1228

1329
GET /repos/:user/:repo/pulls
@@ -45,10 +61,13 @@ body
4561
:_Optional_**string**
4662

4763
base
48-
:_Required_**string** - The branch you want your changes pulled into.
64+
:_Required_**string** - The branch (or git ref) you want your changes pulled into.
65+
This should be an existing branch on the current repository. You cannot
66+
submit a pull request to one repo that requests a merge to a base of
67+
another repo.
4968

5069
head
51-
:_Required_**string** - The branch where your changes are implemented.
70+
:_Required_**string** - The branch(or git ref)where your changes are implemented.
5271

5372
NOTE:`head` and`base` can be either a sha or a branch name. Typically you
5473
would namespace`head` with a user like this:`username:branch`.

‎content/v3/pulls/comments.md‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
title:Pull Request Comments | GitHub API
33
---
44

5-
#Pull Request Comments API
5+
#Pull RequestReviewComments API
66

7-
Pull Request Comments leverage[these](#custom-mime-types) custom mime
7+
Pull Request Review Comments are comments on a portion of the unified
8+
diff. These are separate from Commit Comments (which are applied
9+
directly to a commit, outside of the Pull Request view), and Issue
10+
Comments (which do not reference a portion of the unified diff).
11+
12+
Pull Request Review Comments leverage[these](#custom-mime-types) custom mime
813
types. You can read more about the use of mime types in the API
914
[here](/v3/mime/).
1015

‎content/v3/repos.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ in results.
168168

169169
<%= headers 200 %>
170170
<%= json\
171-
"C" =>"78769",
172-
"Python" =>"7769",
171+
"C" => 78769,
172+
"Python" => 7769,
173173
%>
174174

175175
##List Teams

‎content/v3/repos/hooks.md‎

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,30 @@ The Repository Hooks API manages the post-receive web and service hooks
88
for a repository. There are two main APIs to manage these hooks: a JSON
99
HTTP API, and[PubSubHubbub](#pubsubhubbub).
1010

11+
Active hooks can be configured to trigger for one or more events.
12+
The default event is`push`. The available events are:
13+
14+
*`push` - Any git push to a Repository.
15+
*`issues` - Any time an Issue is opened or closed.
16+
*`issue_comment` - Any time an Issue is commented on.
17+
*`commit_comment` - Any time a Commit is commented on.
18+
*`pull_request` - Any time a Pull Request is opend, closed, or
19+
synchronized (updated due to a new push in the branch that the pull
20+
request is tracking).
21+
*`gollum` - Any time a Wiki page is updated.
22+
*`watch` - Any time a User watches the Repository.
23+
*`download` - Any time a Download is added to the Repository.
24+
*`fork` - Any time a Repository is forked.
25+
*`fork_apply` - Any time a patch is applied to the Repository from the
26+
Fork Queue.
27+
*`member` - Any time a User is added as a collaborator to a
28+
non-Organization Repository.
29+
*`public` - Any time a Repository changes from private to public.
30+
31+
For a Hook to go through, the Hook needs to be configured to trigger for
32+
an event, and the Service has to listen to it. The Services are all
33+
part of the open source[github-services](https://github.com/github/github-services) project.Most of the Services only listen for`push` events. However, the generic[Web Service](https://github.com/github/github-services/blob/master/services/web.rb) listens for all events. Other services like the[IRC Service](https://github.com/github/github-services/blob/master/services/irc.rb) may only listen for`push`,`issues`, and`pull_request` events.
34+
1135
##List
1236

1337
GET /repos/:user/:repo/hooks
@@ -24,7 +48,7 @@ HTTP API, and [PubSubHubbub](#pubsubhubbub).
2448
###Response
2549

2650
<%= headers 200 %>
27-
<%= json:full_hook %>
51+
<%= json:hook %>
2852

2953
##Create a hook
3054

@@ -42,24 +66,26 @@ settings for this hook. These settings vary between the services and
4266
are defined in the
4367
[github-services](https://github.com/github/github-services) repo.
4468

69+
events
70+
:_Optional_**array** - Determines what events the hook is triggered
71+
for. Default:`["push"]`.
72+
4573
active
4674
:_Optional_**boolean** - Determines whether the hook is actually
4775
triggered on pushes.
4876

4977
<%= json\
50-
:name => "campfire",
78+
:name => "web",
5179
:active => true,
5280
:config => {
53-
:subdomain => 'github',
54-
:room => 'Commits',
55-
:token => 'abc123'}
81+
:url => 'http://something.com/webhook'}
5682
%>
5783

5884
###Response
5985

6086
<%= headers 201,
6187
:Location => 'https://api.github.com/repos/user/repo/hooks/1' %>
62-
<%= json:full_hook %>
88+
<%= json:hook %>
6389

6490
###Edit a hook
6591

@@ -73,10 +99,23 @@ See [/hooks](https://api.github.com/hooks) for the possible names.
7399

74100
config
75101
:_Required_**hash** - A Hash containing key/value pairs to provide
76-
settings for this hook. These settings vary between the services and
102+
settings for this hook. Modifying this will replace the entire config
103+
object. These settings vary between the services and
77104
are defined in the
78105
[github-services](https://github.com/github/github-services) repo.
79106

107+
events
108+
:_Optional_**array** - Determines what events the hook is triggered
109+
for. This replaces the entire array of events. Default:`["push"]`.
110+
111+
add_events
112+
:_Optional_**array** - Determines a list of events to be added to the
113+
list of events that the Hook triggers for.
114+
115+
remove_events
116+
:_Optional_**array** - Determines a list of events to be removed from the
117+
list of events that the Hook triggers for.
118+
80119
active
81120
:_Optional_**boolean** - Determines whether the hook is actually
82121
triggered on pushes.
@@ -93,7 +132,7 @@ triggered on pushes.
93132
###Response
94133

95134
<%= headers 200 %>
96-
<%= json:full_hook %>
135+
<%= json:hook %>
97136

98137
##Test a hook
99138

@@ -118,7 +157,10 @@ repository.
118157

119158
GitHub can also serve as a[PubSubHubbub][pubsub] hub for all repositories. PSHB is a simple publish/subscribe protocol that lets servers register to receive updates when a topic is updated. The updates are sent with an HTTP POST request to a callback URL. Topic URLs for a GitHub repository's pushes are in this format:
120159

121-
https://github.com/:user/:repo/events/push
160+
https://github.com/:user/:repo/events/:event
161+
162+
The event can be any Event string that is listed at the top of this
163+
document.
122164

123165
The default format is what[existing post-receive hooks should
124166
expect][post-receive]: A JSON body sent as the`payload` parameter in a
@@ -156,7 +198,7 @@ hub.mode
156198

157199
hub.topic
158200
:_Required_**string** - The URI of the GitHub repository to subscribe
159-
to. The path must be in the format of`/:user/:repo/events/push`.
201+
to. The path must be in the format of`/:user/:repo/events/:event`.
160202

161203
hub.callback
162204
:_Required_**string** - The URI to receive the updates to the topic.

‎layouts/default.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ <h3><a href="#" class="js-expand-btn collapsed">&nbsp;</a><a href="/v3/orgs/">Or
8181
<liclass="js-topic">
8282
<h3><ahref="#"class="js-expand-btn collapsed">&nbsp;</a><ahref="/v3/pulls/">Pull Requests</a></h3>
8383
<ulclass="js-guides">
84-
<li><ahref="/v3/pulls/comments/">Comments</a></li>
84+
<li><ahref="/v3/pulls/comments/">ReviewComments</a></li>
8585
</ul>
8686
</li>
8787
<liclass="js-topic">

‎lib/resources.rb‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ def json(key)
150150
}
151151
}
152152

153-
154153
PULL={
155154
"url"=>"https://api.github.com/octocat/Hello-World/pulls/1",
156155
"html_url"=>"https://github.com/octocat/Hello-World/pulls/1",
@@ -165,6 +164,16 @@ def json(key)
165164
"updated_at"=>"2011-01-26T19:01:12Z",
166165
"closed_at"=>"2011-01-26T19:01:12Z",
167166
"merged_at"=>"2011-01-26T19:01:12Z",
167+
"_links"=>{
168+
"self"=>{'_href'=>
169+
"https://api.github.com/octocat/Hello-World/pulls/1"},
170+
"html"=>{'_href'=>
171+
"https://github.com/octocat/Hello-World/pull/1"},
172+
"comments"=>{'_href'=>
173+
"https://api.github.com/octocat/Hello-World/issues/1/comments"},
174+
"review_comments"=>{'_href'=>
175+
"https://api.github.com/octocat/Hello-World/pulls/1/comments"}
176+
}
168177
}
169178

170179
FULL_PULL=PULL.merge({
@@ -645,13 +654,13 @@ def json(key)
645654
"updated_at"=>"2011-09-06T20:39:23Z",
646655
"created_at"=>"2011-09-06T17:26:27Z",
647656
"name"=>"web",
657+
"events"=>["push"],
648658
"active"=>true,
659+
"config"=>
660+
{'url'=>'http://example.com','content_type'=>'json'},
649661
"id"=>1
650662
}
651663

652-
FULL_HOOK=HOOK.merge'config'=>
653-
{'url'=>'http://example.com','content_type'=>'json'}
654-
655664
end
656665
end
657666

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp