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.

Commit9a8d1af

Browse files
committed
add header and use an issue event for the example
1 parent84b727e commit9a8d1af

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

‎content/webhooks/index.md‎

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,11 @@ types](/v3/activity/events/types/), with the exception of [the original `push`
8787
event](https://developer.github.com/v3/activity/events/types/#pushevent),
8888
which has a more detailed payload.
8989

90-
A full payload will also show the userthat performed the event (`sender`),
90+
A full payload will also show the userwho performed the event (`sender`),
9191
the repository (`repository`), and the organization (`organization`) if applicable.
9292

93+
####Delivery headers
94+
9395
HTTP requests made to your server's endpoint will contain several special
9496
headers:
9597

@@ -101,19 +103,41 @@ Header | Description
101103

102104
Also, the`User-Agent` for the requests will have the prefix`GitHub Hookshot`.
103105

104-
**Example**:
106+
####Example delivery
105107

106108
<preclass="terminal">
107109
POST /payload HTTP/1.1
108110

109111
Host: localhost:4567
110112
X-Github-Delivery: 72d3162e-cc78-11e3-81ab-4c9367dc0958
111113
User-Agent: GitHub Hookshot 044aadd
112-
Content-Type: application/x-www-form-urlencoded
113-
Content-Length: 2491
114-
X-Github-Event: push
115-
116-
payload=%7B%22zen%22%3A%22Keep+it+logically+awesome.%22%2C%22hook_id%22%3A2151407%7D
114+
Content-Type: application/json
115+
Content-Length: 6615
116+
X-Github-Event: issue
117+
118+
{
119+
"action": "opened",
120+
"issue": {
121+
"url": "https://api.github.com/repos/octocat/Hello-World/issues/1347",
122+
"number": 1347,
123+
...
124+
},
125+
"repository" : {
126+
"id": 1296269,
127+
"full_name": "octocat/Hello-World",
128+
"owner": {
129+
"login": "octocat",
130+
"id": 1,
131+
...
132+
},
133+
...
134+
},
135+
"sender": {
136+
"login": "octocat",
137+
"id": 1,
138+
...
139+
}
140+
}
117141
</pre>
118142

119143
##Wildcard Event

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp