You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2017. It is now read-only.
Copy file name to clipboardExpand all lines: content/v3/repos/hooks.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,14 +123,16 @@ Name | Type | Description
123
123
#####Example
124
124
125
125
The["web" service hook](https://github.com/github/github-services/blob/master/lib/services/web.rb#L4-11)
126
-
takes these fields:
126
+
takes these fields in the`config`:
127
127
128
-
*`url`
129
-
*`content_type`
130
-
*`secret`
128
+
Name | Type | Description
129
+
-----|------|--------------
130
+
`url`|`string` |**Required**. The URL to which the payloads will be delivered.
131
+
`content_type`|`string` | The media type used to serialize the payloads. Supported values:`json` and`form`. Default:`form`.
132
+
`secret`|`string` | If defined, then HTTP requests that deliver the payloads will include an`X-Hub-Signature` header. The value of this header is computed as the[HMAC hex digest of the body, using the`secret` as the key][hub-signature].
133
+
`insecure_ssl`|`string` | Determines whether the SSL certificate of the host for`url` will be verified when delivering payloads. Supported values:`"0"` (verification is performed) and`"1"` (verification is not performed). Default:`"0"`.
131
134
132
-
Here's how you can setup a hook that posts raw JSON
133
-
(instead of the default legacy format):
135
+
Here's how you can setup a hook that posts payloads in JSON format:
134
136
135
137
<%= json\
136
138
:name => "web",
@@ -153,7 +155,7 @@ Here's how you can setup a hook that posts raw JSON
153
155
154
156
####Parameter
155
157
156
-
Name | Type | Description
158
+
Name | Type | Description
157
159
-----|------|--------------
158
160
`config`|`hash` | Key/value pairs to provide settings for this hook. Modifying this will replace the entire config object. These settings vary between the services and are defined in the[github-services](https://github.com/github/github-services) repository. Booleans are stored internally as "1" for true, and "0" for false. Any JSON`true`/`false` values will be converted automatically.
159
161
`events`|`array` | Determines what events the hook is triggered for. This replaces the entire array of events. Default:`["push"]`