There was an error while loading. Please reload this page.
1 parent cef340e commit 2a19bbdCopy full SHA for 2a19bbd
1 file changed
content/webhooks/index.md
@@ -87,6 +87,59 @@ types](/v3/activity/events/types/), with the exception of [the original `push`
87
event](https://developer.github.com/v3/activity/events/types/#pushevent),
88
which has a more detailed payload.
89
90
+A full payload will also show the user who performed the event (`sender`),
91
+the repository (`repository`), and the organization (`organization`) if applicable.
92
+
93
+#### Delivery headers
94
95
+HTTP requests made to your server's endpoint will contain several special
96
+headers:
97
98
+Header | Description
99
+-------|-------------|
100
+`X-Github-Event`| Name of the [event](#events) that triggered this delivery.
101
+`X-Hub-Signature`| HMAC hex digest of the payload, using [the hook's `secret`](/v3/repos/hooks/#create-a-hook) as the key (if configured).
102
+`X-Github-Delivery`| Unique ID for this delivery.
103
104
+Also, the `User-Agent` for the requests will have the prefix `GitHub Hookshot`.
105
106
+#### Example delivery
107
108
+<pre class="terminal">
109
+POST /payload HTTP/1.1
110
111
+Host: localhost:4567
112
+X-Github-Delivery: 72d3162e-cc78-11e3-81ab-4c9367dc0958
113
+User-Agent: GitHub Hookshot 044aadd
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
137
138
139
+ }
140
+}
141
+</pre>
142
143
## Wildcard Event
144
145
We also support a wildcard (`*`) that will match all supported events. When you
0 commit comments