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
Copy file name to clipboardExpand all lines: content/v3/pulls.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ Name | Type | Description
42
42
`head`|`string` | Filter pulls by head user and branch name in the format of `user:ref-name`. Example: `github:new-script-format`.
43
43
`base`|`string` | Filter pulls by base branch name. Example: `gh-pages`.
44
44
`sort`|`string`| What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month). Default: `created`
45
-
`direction`|`string`| The direction of the sort. Can be either `asc` or `desc`. Default: `desc`
45
+
`direction`|`string`| The direction of the sort. Can be either `asc` or `desc`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`.
Copy file name to clipboardExpand all lines: content/v3/repos/hooks.md
+8-11Lines changed: 8 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ or the [PubSubHubbub API](#pubsubhubbub).
33
33
34
34
POST /repos/:owner/:repo/hooks
35
35
36
-
**Note**: Services other than the `web` service can have at most one hook configured for a repository. Creating hooks for a service that already has a hook configured will [update the existing hook](#edit-a-hook). The `web` service can have multiple hooks configured for a repository.
36
+
**Note**: Repositories can have more than one webhook configured, but all other services can have at most one configuration. Creating hooks for a service that already has one configured will [update the existing hook](#edit-a-hook).
37
37
38
38
### Parameters
39
39
@@ -46,17 +46,14 @@ Name | Type | Description
46
46
47
47
#### Example
48
48
49
-
The ["web" service hook](https://github.com/github/github-services/blob/master/lib/services/web.rb#L4-11)
50
-
takes these fields in the `config`:
49
+
To create [a webhook](/webhooks), [the following fields are required](https://github.com/github/github-services/blob/master/lib/services/web.rb#L4-11) by the `config`:
51
50
52
-
Name | Type | Description
53
-
-----|------|--------------
54
-
`url`|`string` | **Required**. The URL to which the payloads will be delivered.
55
-
`content_type`|`string` | The media type used to serialize the payloads. Supported values: `json` and `form`. Default: `form`.
56
-
`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].
57
-
`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"`.
51
+
*`url`: A required string defining the URL to which the payloads will be delivered.
52
+
*`content_type`: An optional string defining the media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.
53
+
*`secret`: An optional string that's passed with the HTTP requests as 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].
54
+
*`insecure_ssl`: An optional string that determines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `"0"` (verification is performed) and `"1"` (verification is not performed). The default is `"0"`.
58
55
59
-
Here's how you can setup a hook that posts payloads in JSON format:
56
+
Here's how you can create a hook that posts payloads in JSON format:
60
57
61
58
<%= json \
62
59
:name => "web",
@@ -135,7 +132,7 @@ This will trigger a [ping event][ping-event-url] to be sent to the hook.
135
132
136
133
## Receiving Webhooks
137
134
138
-
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.
135
+
In order for GitHub to send webhook payloads, your server needs to be accessible from the Internet. We also highly suggest using SSL so that we can send encrypted payloads over HTTPS.
0 commit comments