Skip to content

Commit 4588a7e

Browse files
committed
Merge branch 'master' into document-status-hook
2 parents c5e3d3c + 0d1da0c commit 4588a7e

File tree

3 files changed

+59
-104
lines changed

3 files changed

+59
-104
lines changed

content/v3/activity/events/types.md

Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ They're only created for various internal and repository hooks.
1919

2020
## CommitCommentEvent
2121

22+
Triggered when a [commit comment](/v3/repos/comments/#list-commit-comments-for-a-repository) is created.
23+
2224
Hook name: `commit_comment`
2325

2426
comment
@@ -45,7 +47,7 @@ description
4547

4648
## DeleteEvent
4749

48-
Represents a deleted branch or tag.
50+
Represents a [deleted branch or tag](/v3/git/refs/#delete-a-reference).
4951

5052
Hook name: `delete`
5153

@@ -57,21 +59,29 @@ ref
5759

5860
## DownloadEvent
5961

62+
Triggered when a new [download](/v3/repos/downloads/) is created.
63+
6064
Hook name: `download`
6165

66+
Events of this type are **no longer created**, but it's possible that they exist in timelines of some users.
67+
6268
download
6369
: **object** - The [download](/v3/repos/downloads/) that was just
6470
created.
6571

6672
## FollowEvent
6773

74+
Triggered when a user [follows another user](/v3/users/followers/#follow-a-user).
75+
6876
Hook name: `follow`
6977

7078
target
7179
: **object** - The [user](/v3/users) that was just followed.
7280

7381
## ForkEvent
7482

83+
Triggered when a user [forks a repository](/v3/repos/forks/#create-a-fork).
84+
7585
Hook name: `fork`
7686

7787
forkee
@@ -81,6 +91,8 @@ forkee
8191

8292
Triggered when a patch is applied in the Fork Queue.
8393

94+
Events of this type are **no longer created**, but it's possible that they exist in timelines of some users.
95+
8496
Hook name: `fork_apply`
8597

8698
head
@@ -94,8 +106,12 @@ after
94106

95107
## GistEvent
96108

109+
Triggered when a [Gist](/v3/gists/) is created or updated.
110+
97111
Hook name: `gist`
98112

113+
Events of this type are **no longer created**, but it's possible that they exist in timelines of some users.
114+
99115
action
100116
: **string** - The action that was performed. Can be "create" or "update"
101117

@@ -104,6 +120,8 @@ gist
104120

105121
## GollumEvent
106122

123+
Triggered when a Wiki page is created or updated.
124+
107125
Hook name: `gollum`
108126

109127
pages
@@ -116,7 +134,7 @@ pages[][title]
116134
: **string** - The current page title.
117135

118136
pages[][action]
119-
: **string** - The action that was performed on the page.
137+
: **string** - The action that was performed on the page. Can be "created" or "edited".
120138

121139
pages[][sha]
122140
: **string** - The latest commit SHA of the page.
@@ -126,10 +144,12 @@ pages[][html_url]
126144

127145
## IssueCommentEvent
128146

147+
Triggered when an [issue comment](/v3/issues/comments/) is created.
148+
129149
Hook name: `issue_comment`
130150

131151
action
132-
: **string** - The action that was performed on the comment.
152+
: **string** - The action that was performed on the comment. Currently, can only be "created".
133153

134154
issue
135155
: **object** - The [issue](/v3/issues/) the comment belongs to.
@@ -139,6 +159,8 @@ comment
139159

140160
## IssuesEvent
141161

162+
Triggered when an [issue](/v3/issues) is created, closed or reopened.
163+
142164
Hook name: `issues`
143165

144166
action
@@ -150,27 +172,28 @@ issue
150172

151173
## MemberEvent
152174

153-
Triggered when a user is added as a collaborator to a repository.
175+
Triggered when a user is [added as a collaborator](/v3/repos/collaborators/#add-collaborator) to a repository.
154176

155177
Hook name: `member`
156178

157179
member
158180
: **object** - The [user](/v3/users/) that was added.
159181

160182
action
161-
: **string** - The action that was performed: "added".
183+
: **string** - The action that was performed. Currently, can only be "added".
162184

163185
## PublicEvent
164186

165-
This is triggered when a private repo is open sourced. Without a doubt: the
166-
best GitHub event.
187+
Triggered when a private repository is [open sourced](/v3/repos/#edit). Without a doubt: the best GitHub event.
167188

168189
Hook name: `public`
169190

170191
(empty payload)
171192

172193
## PullRequestEvent
173194

195+
Triggered when a [pull request](/v3/pulls) is created, closed, reopened or synchronized.
196+
174197
Hook name: `pull_request`
175198

176199
action
@@ -185,13 +208,17 @@ pull\_request
185208

186209
## PullRequestReviewCommentEvent
187210

211+
Triggered when a [comment is created on a portion of the unified diff](/v3/pulls/comments) of a pull request.
212+
188213
Hook name: `pull_request_review_comment`
189214

190215
comment
191216
: **object** - The [comment](/v3/pulls/comments) itself.
192217

193218
## PushEvent
194219

220+
Triggered when a repository branch is pushed to.
221+
195222
Hook name: `push`
196223

197224
head
@@ -231,6 +258,8 @@ before.
231258

232259
## ReleaseEvent
233260

261+
Triggered when a [release](/v3/repos/releases/#get-a-single-release) is published.
262+
234263
Hook name: `release`
235264

236265
action
@@ -256,6 +285,10 @@ target_url
256285

257286
## TeamAddEvent
258287

288+
Triggered when a [user is added to a team](/v3/orgs/teams/#add-team-member) or when a [repository is added to a team](/v3/orgs/teams/#add-team-repo).
289+
290+
Note: this event is created in [users' organization timelines](/v3/activity/events/#list-events-for-an-organization).
291+
259292
Hook name: `team_add`
260293

261294
team
@@ -270,14 +303,13 @@ repo
270303

271304
## WatchEvent
272305

273-
The WatchEvent is related to starring a repository, not watching.
274-
See [this API blog post](http://developer.github.com/changes/2012-9-5-watcher-api/)
275-
for an explanation.
306+
The WatchEvent is related to [starring a repository](/v3/activity/starring/#star-a-repository), not [watching](/v3/activity/watching/).
307+
See [this API blog post](/changes/2012-9-5-watcher-api/) for an explanation.
276308

277-
The event’s actor is the user who starred a repository, and the event’s repo is
278-
the repository that was starred.
309+
The event’s actor is the [user](/v3/users/) who starred a repository, and the
310+
event’s repo is the [repository](/v3/repos/) that was starred.
279311

280312
Hook name: `watch`
281313

282314
action
283-
: **string** - The action that was performed: "started".
315+
: **string** - The action that was performed. Currently, can only be "started".

content/v3/repos/downloads.md

Lines changed: 0 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -29,96 +29,6 @@ instead.
2929
<%= headers 200 %>
3030
<%= json :download %>
3131

32-
## Create a new download (Part 1: Create the resource)
33-
34-
Creating a new download is a two step process. You must first create a
35-
new download resource.
36-
37-
POST /repos/:owner/:repo/downloads
38-
39-
### Input
40-
41-
name
42-
: _Required_ **string**
43-
44-
size
45-
: _Required_ **number** - Size of file in bytes.
46-
47-
description
48-
: _Optional_ **string**
49-
50-
content\_type
51-
: _Optional_ **string**
52-
53-
<%= json \
54-
:name => "new_file.jpg",
55-
:size => 114034,
56-
:description => "Latest release",
57-
:content_type => "text/plain"
58-
%>
59-
60-
### Response
61-
62-
<%= headers 201, :Location => "https://api.github.com/user/repo/downloads/1" %>
63-
<%= json :create_download %>
64-
65-
## Create a new download (Part 2: Upload file to s3)
66-
67-
Now that you have created the download resource, you can use the
68-
information in the response to upload your file to s3. This can be done
69-
with a `POST` to the `s3_url` you got in the create response. Here is a
70-
brief example using curl:
71-
72-
curl \
73-
-F "key=downloads/octocat/Hello-World/new_file.jpg" \
74-
-F "acl=public-read" \
75-
-F "success_action_status=201" \
76-
-F "Filename=new_file.jpg" \
77-
-F "AWSAccessKeyId=1ABCDEF..." \
78-
-F "Policy=ewogIC..." \
79-
-F "Signature=mwnF..." \
80-
-F "Content-Type=image/jpeg" \
81-
-F "file=@new_file.jpg" \
82-
https://github.s3.amazonaws.com/
83-
84-
NOTES
85-
86-
The order in which you pass these fields matters! Follow the order shown
87-
above exactly. All parameters shown are required and if you excluded or
88-
modify them your upload will fail because the values are hashed and signed
89-
by the policy.
90-
91-
key
92-
: Value of `path` field in the response.
93-
94-
acl
95-
: Value of `acl` field in the response.
96-
97-
success_action_status
98-
: 201, or whatever you want to get back.
99-
100-
Filename
101-
: Value of `name` field in the response.
102-
103-
AWSAccessKeyId
104-
: Value of `accesskeyid` field in the response.
105-
106-
Policy
107-
: Value of `policy` field in the response.
108-
109-
Signature
110-
: Value of `signature` field in the response.
111-
112-
Content-Type
113-
: Value of `mime_type` field in the response.
114-
115-
file
116-
: Local file. Example assumes the file existing in the directory where
117-
you are running the curl command. Yes, the `@` matters.
118-
119-
More information about using the REST API to interact with s3 can
120-
be found [here](http://docs.amazonwebservices.com/AmazonS3/latest/API/).
121-
12232
## Delete a download
12333

12434
DELETE /repos/:owner/:repo/downloads/:id

content/v3/repos/releases.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,24 @@ name (URI query parameter)
185185

186186
Send the raw binary content of the asset as the request body.
187187

188-
### Response
188+
### Response for successful upload
189189

190190
<%= headers 201 %>
191191
<%= json :release_asset %>
192192

193+
### Response for accepted upload
194+
195+
The upload did not complete, but we will keep trying.
196+
197+
<%= headers 202 %>
198+
<%= json :release_asset %>
199+
200+
### Response for upstream failure
201+
202+
This may leave an empty asset with a state of "new". It can be safely deleted.
203+
204+
<%= headers 502 %>
205+
193206
## Get a single release asset
194207

195208
GET /repos/:owner/:repo/releases/assets/:id

0 commit comments

Comments
 (0)