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.

Commit1e22005

Browse files
committed
Merge pull request#73 from github/hooks-insecure-ssl
Document config attributes used for creating webhooks
2 parents48ec6da +a7c30f2 commit1e22005

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

‎content/v3/repos/hooks.md‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,16 @@ Name | Type | Description
123123
#####Example
124124

125125
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`:
127127

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"`.
131134

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:
134136

135137
<%= json\
136138
:name => "web",
@@ -153,7 +155,7 @@ Here's how you can setup a hook that posts raw JSON
153155

154156
####Parameter
155157

156-
Name | Type | Description
158+
Name | Type | Description
157159
-----|------|--------------
158160
`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.
159161
`events`|`array` | Determines what events the hook is triggered for. This replaces the entire array of events. Default:`["push"]`
@@ -260,4 +262,5 @@ Name | Type | Description
260262
[pubsub]:http://code.google.com/p/pubsubhubbub/
261263
[post-receive]:http://help.github.com/post-receive-hooks/
262264
[ruby-secret]:https://github.com/github/github-services/blob/14f4da01ce29bc6a02427a9fbf37b08b141e81d9/lib/services/web.rb#L47-L50
265+
[hub-signature]:https://github.com/github/github-services/blob/f3bb3dd780feb6318c42b2db064ed6d481b70a1f/lib/service/http_helper.rb#L77
263266
[pshb-secret]:http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.3.html#authednotify

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp