@@ -7,9 +7,199 @@ title: Event types | GitHub API
7
7
Each event has a similar JSON schema, but a unique ` payload ` object that is
8
8
determined by its event type. [ Repository hook] ( http://developer.github.com/v3/repos/hooks/ ) names relate to event types, and will have the exact same payload. The only exception to this is the ` push ` hook, which has a larger, more detailed payload.
9
9
10
+ This describes just the payload of an event. A full event will also
11
+ show the user that performed the event (actor), the repository, and the
12
+ organization (if applicable).
13
+
14
+ Note that some of these events may not be rendered in timelines.
15
+ They're only created for various internal and repository hooks.
16
+
17
+ * <a href =" #commitcommentevent " >CommitComment</a >
18
+ * <a href =" #createevent " >CreateEvent</a >
19
+ * <a href =" #deleteevent " >DeleteEvent</a >
20
+ * <a href =" #downloadevent " >DownloadEvent</a >
21
+ * <a href =" #followevent " >FollowEvent</a >
22
+ * <a href =" #forkevent " >ForkEvent</a >
23
+ * <a href =" #forkapplyevent " >ForkApplyEvent</a >
24
+ * <a href =" #gistevent " >GistEvent</a >
25
+ * <a href =" #gollumevent " >GollumEvent</a >
26
+ * <a href =" #issuecommentevent " >IssueCommentEvent</a >
27
+ * <a href =" #issuesevent " >IssuesEvent</a >
28
+ * <a href =" #memberevent " >MemberEvent</a >
29
+ * <a href =" #publicevent " >PublicEvent</a >
30
+ * <a href =" #pullrequestevent " >PullRequestEvent</a >
31
+ * <a href =" #pushevent " >PushEvent</a >
32
+ * <a href =" #teamaddevent " >TeamAddEvent</a >
33
+ * <a href =" #watchevent " >WatchEvent</a >
34
+
35
+ ## CommitComment
36
+
37
+ Hook name: ` commit_comment `
38
+
39
+ comment
40
+ : ** object** - The [ comment] ( /v3/repos/commits/#list-commit-comments-for-a-repository ) itself.
41
+
42
+ ## CreateEvent
43
+
44
+ Represents a created repository, branch, or tag.
45
+
46
+ Hook name: ` create `
47
+
48
+ ref\_ type
49
+ : ** string** - The object that was created: "repository", "branch", or
50
+ "tag"
51
+
52
+ ref
53
+ : ** string** - The git ref (or ` null ` if only a repository was created).
54
+
55
+ master\_ branch
56
+ : ** string** - The name of the repository's master branch.
57
+
58
+ description
59
+ : ** string** - The repository's current description.
60
+
61
+ ## DeleteEvent
62
+
63
+ Represents a deleted branch or tag.
64
+
65
+ Hook name: ` delete `
66
+
67
+ ref\_ type
68
+ : ** string** - The object that was deleted: "branch" or "tag".
69
+
70
+ ref
71
+ : ** string** - The full git ref.
72
+
73
+ ## DownloadEvent
74
+
75
+ Hook name: ` download `
76
+
77
+ download
78
+ : ** object** - The [ download] ( /v3/repos/downloads/ ) that was just
79
+ created.
80
+
81
+ ## FollowEvent
82
+
83
+ Hook name: ` follow `
84
+
85
+ target
86
+ : ** object** - The [ user] ( /v3/users ) that was just followed.
87
+
88
+ ## ForkEvent
89
+
90
+ Hook name: ` fork `
91
+
92
+ forkee
93
+ : ** object** - The created [ repository] ( /v3/repos/ ) .
94
+
95
+ ## ForkApplyEvent
96
+
97
+ Triggered when a patch is applied in the Fork Queue.
98
+
99
+ Hook name: ` fork_apply `
100
+
101
+ head
102
+ : ** string** - The branch name the patch is applied to.
103
+
104
+ before
105
+ : ** string** - SHA of the repo state before the patch.
106
+
107
+ after
108
+ : ** string** - SHA of the repo state after the patch.
109
+
110
+ ## GistEvent
111
+
112
+ Hook name: ` gist `
113
+
114
+ action
115
+ : ** string** - The action that was performed: "create" or "update"
116
+
117
+ gist
118
+ : ** object** - The [ gist] ( /v3/gists/ ) itself.
119
+
120
+ ## GollumEvent
121
+
122
+ Hook name: ` gollum `
123
+
124
+ pages
125
+ : ** array** - The pages that were updated.
126
+
127
+ pages[ ] [ page_name ]
128
+ : ** string** - The name of the page.
129
+
130
+ pages[ ] [ title ]
131
+ : ** string** - The current page title.
132
+
133
+ pages[ ] [ action ]
134
+ : ** string** - The action that was performed on the page.
135
+
136
+ pages[ ] [ sha ]
137
+ : ** string** - The latest commit SHA of the page.
138
+
139
+ pages[ ] [ html_url ]
140
+ : ** string** - Points to the HTML wiki page.
141
+
142
+ ## IssueCommentEvent
143
+
144
+ Hook name: ` issue_comment `
145
+
146
+ action
147
+ : ** string** - The action that was performed on the comment.
148
+
149
+ issue
150
+ : ** object** - The [ issue] ( /v3/issues/ ) the comment belongs to.
151
+
152
+ comment
153
+ : ** object** - The [ comment] ( /v3/issues/comments/ ) itself.
154
+
155
+ ## IssuesEvent
156
+
157
+ Hook name: ` issues `
158
+
159
+ action
160
+ : ** string** - The action that was performed: "opened", "closed", or
161
+ "reopened".
162
+
163
+ issue
164
+ : ** string** - The [ issue] ( /v3/issues ) itself.
165
+
166
+ ## MemberEvent
167
+
168
+ Triggered when a user is added as a collaborator to a repository.
169
+
170
+ Hook name: ` member `
171
+
172
+ member
173
+ : ** object** - The [ user] ( /v3/users/ ) that was added.
174
+
175
+ a
176
+
177
+ ## PublicEvent
178
+
179
+ This is triggered when a private repo is open sourced. Without a doubt: the
180
+ best GitHub event.
181
+
182
+ Hook name: ` public `
183
+
184
+ (empty payload)
185
+
186
+ ## PullRequestEvent
187
+
188
+ Hook name: ` pull_request `
189
+
190
+ action
191
+ : ** string** - The action that was performed: "opened", "closed",
192
+ "synchronize", or "reopened".
193
+
194
+ number
195
+ : ** integer** - The pull request number.
196
+
197
+ pull\_ request
198
+ : ** object** - The [ pull request] ( /v3/pulls ) itself.
199
+
10
200
## PushEvent
11
201
12
- Hook name: push
202
+ Hook name: ` push `
13
203
14
204
head
15
205
: ** string** - The SHA of the HEAD commit on the repository.
@@ -42,3 +232,27 @@ commits[][author][email]
42
232
commits[ ] [ url ]
43
233
: ** url** - Points to the commit API resource.
44
234
235
+ ## TeamAddEvent
236
+
237
+ Hook name: ` team_add `
238
+
239
+ team
240
+ : ** object** - The [ team] ( /v3/orgs/teams/ ) that was modified. Note:
241
+ older events may not include this in the payload.
242
+
243
+ user
244
+ : ** object** - The [ user] ( /v3/users/ ) that was added to this team.
245
+
246
+ repo
247
+ : ** object** - The [ repository] ( /v3/repos/ ) that was added to this team.
248
+
249
+ ## WatchEvent
250
+
251
+ The event's actor is the watcher, and the event's repo is the watched
252
+ repository.
253
+
254
+ Hook name: ` watch `
255
+
256
+ action
257
+ : ** string** - The action that was performed.
258
+
0 commit comments