Skip to content

Commit 1312943

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent dcac49e commit 1312943

3 files changed

Lines changed: 14 additions & 22 deletions

File tree

content/v3/pulls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Name | Type | Description
4242
`head`|`string` | Filter pulls by head user and branch name in the format of `user:ref-name`. Example: `github:new-script-format`.
4343
`base`|`string` | Filter pulls by base branch name. Example: `gh-pages`.
4444
`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`.
4646

4747

4848
### Response

content/v3/repos/hooks.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ or the [PubSubHubbub API](#pubsubhubbub).
3333

3434
POST /repos/:owner/:repo/hooks
3535

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).
3737

3838
### Parameters
3939

@@ -46,17 +46,14 @@ Name | Type | Description
4646

4747
#### Example
4848

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`:
5150

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

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

6158
<%= json \
6259
:name => "web",
@@ -135,7 +132,7 @@ This will trigger a [ping event][ping-event-url] to be sent to the hook.
135132

136133
## Receiving Webhooks
137134

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.
139136

140137
### Webhook Headers
141138

content/webhooks/index.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ can configure hooks programmatically [via the API](/v3/repos/hooks/).
1919

2020
## Services
2121

22-
A service is basically the name used to refer to a hook that has configuration
22+
A service is basically the name used to refer to a webhook that has configuration
2323
settings, a list of available events, and default events.
2424

2525
For instance, the
@@ -31,10 +31,7 @@ event by default and supports the `public` event type as well.
3131
A number of services have been integrated through the open source
3232
[github-services](https://github.com/github/github-services) project. When
3333
[creating a hook](/webhooks/creating/), the `:name` parameter must refer to one of
34-
these services. A generic
35-
[Web](https://github.com/github/github-services/blob/master/lib/services/web.rb)
36-
service is available that can be configured to trigger for any of the available
37-
[events](#events).
34+
these services.
3835

3936
Documentation for all available service hooks can be found in the
4037
[docs directory](https://github.com/github/github-services/tree/master/docs)
@@ -49,15 +46,13 @@ Active hooks can be configured to trigger for one or more service supported
4946
events. In other words, the service must support listening for the event you
5047
want to trigger.
5148

52-
For example, the
53-
[Web](https://github.com/github/github-services/blob/master/lib/services/web.rb)
54-
service supports listening for all events, while the
49+
For example, generic webhooks supports listening for all events, while the
5550
[IRC](https://github.com/github/github-services/blob/master/lib/services/irc.rb)
5651
service can only listen for `push`, `issues`, `pull_request`, `commit_comment`,
5752
`pull_request_review_comment`, and `issue_comment` events.
5853

59-
Each service also has a set of default events for which it listens if it isn't
60-
configured. For example, the Web service listens only for `push` events by
54+
Each service also has a set of default events for which it listens if it isn't
55+
configured. For example, generic webhooks listen only for `push` events by
6156
default, while the IRC service listens on `push` and `pull_requests` events.
6257
Service hooks set up via the repository settings UI listen only for the default
6358
set of events, but can be

0 commit comments

Comments
 (0)