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.

Commite1cbee2

Browse files
committed
Merge pull request#451 from github/webhook-header-docs
Document headers we send to payloads
2 parents5bcb112 +5985fdf commite1cbee2

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

‎content/v3/repos/hooks.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,20 @@ This will trigger a [ping event][ping-event-url] to be sent to the hook.
131131

132132
<%= headers 204 %>
133133

134+
##Receiving Webhooks
135+
136+
In order for GitHub to send Webhook payloads to your service, your server needs to be accessible from the Internet. We also highly suggest using SSL so that we can send encrypted payloads over HTTPS.
137+
138+
###Webhook Headers
139+
140+
GitHub will send along a few HTTP headers to differentiate between event types and payload identifiers.
141+
142+
Name | Description
143+
-----|-----------|
144+
`X-GitHub-Event` | The[event type](#events) that was triggered.
145+
`X-GitHub-Delivery` | A[guid][guid] to identify the payload and event being sent.
146+
`X-GitHub-Signature` | The value of this header is computed as the HMAC hex digest of the body, using the`secret` config option as the key.
147+
134148
##PubSubHubbub
135149

136150
GitHub can also serve as a[PubSubHubbub][pubsub] hub for all repositories.
@@ -191,10 +205,11 @@ Name | Type | Description
191205
``hub.secret``|`string` | A shared secret key that generates a SHA1 HMAC of the outgoing body content. You can verify a push came from GitHub by comparing the raw request body with the contents of the`X-Hub-Signature` header. You can see[our Ruby implementation][ruby-secret], or[the PubSubHubbub documentation][pshb-secret] for more details.
192206

193207

208+
[guid]:http://en.wikipedia.org/wiki/Globally_unique_identifier
194209
[pubsub]:http://code.google.com/p/pubsubhubbub/
195210
[post-receive]:http://help.github.com/post-receive-hooks/
196211
[ruby-secret]:https://github.com/github/github-services/blob/14f4da01ce29bc6a02427a9fbf37b08b141e81d9/lib/services/web.rb#L47-L50
197212
[hub-signature]:https://github.com/github/github-services/blob/f3bb3dd780feb6318c42b2db064ed6d481b70a1f/lib/service/http_helper.rb#L77
198213
[pshb-secret]:http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.3.html#authednotify
199214
[events-url]:/webhooks/#events
200-
[ping-event-url]:/webhooks/#ping-event
215+
[ping-event-url]:/webhooks/#ping-event

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp