Skip to content

Commit a5f09d7

Browse files
committed
Reword "hooks" references to "webhooks"
1 parent d927464 commit a5f09d7

7 files changed

Lines changed: 59 additions & 59 deletions

File tree

content/v3/repos/hooks.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
11
---
2-
title: Hooks | GitHub API
2+
title: Webhooks | GitHub API
33
---
44

5-
# Hooks
5+
# Webhooks
66

77
* TOC
88
{:toc}
99

10-
The Repository Hooks API allows repository admins to manage the post-receive
11-
hooks for a repository. Hooks can be managed using the [JSON HTTP API](#json-http)
10+
The Repository Webhooks API allows repository admins to manage the post-receive
11+
hooks for a repository. Webhooks can be managed using the [JSON HTTP API](#json-http)
1212
and the [PubSubHubbub API](#pubsubhubbub).
1313

14-
Each hook can be configured for a specific [service](#services) and one or
14+
Each hook can be configured for a specific [service](#services) and one or
1515
more [events](#events), regardless of the API used to do so.
1616

1717
## Services
1818

1919
A service is basically the name used to refer to a hook that has configuration
2020
settings, a list of available events, and default events.
2121

22-
> For instance, the
22+
> For instance, the
2323
[email](https://github.com/github/github-services/blob/master/lib/services/email.rb)
24-
service is a built-in GitHub service that will send event [payloads](#payloads)
25-
to, at most, two email addresses. It will trigger for the `push`
24+
service is a built-in GitHub service that will send event [payloads](#payloads)
25+
to, at most, two email addresses. It will trigger for the `push`
2626
event by default and supports the `public` event type as well.
2727

2828
A number of services have been integrated through the open source
29-
[github-services](https://github.com/github/github-services) project. When
30-
creating a [hook](#create-a-hook), the `:name` parameter must refer to one of
31-
these services. A generic
32-
[Web](https://github.com/github/github-services/blob/master/lib/services/web.rb)
33-
service is available that can configured to trigger for any of the available
29+
[github-services](https://github.com/github/github-services) project. When
30+
creating a [hook](#create-a-hook), the `:name` parameter must refer to one of
31+
these services. A generic
32+
[Web](https://github.com/github/github-services/blob/master/lib/services/web.rb)
33+
service is available that can configured to trigger for any of the available
3434
[events](#events).
3535

3636
Documentation for all available service hooks can be found in the
3737
[docs directory](https://github.com/github/github-services/tree/master/docs)
3838
of the github-services repository. A JSON representation of their names,
39-
default events, supported events, and configuration options can be seen
39+
default events, supported events, and configuration options can be seen
4040
at [api.github.com/hooks](https://api.github.com/hooks).
4141

4242

43-
## Events
43+
## Events
4444

45-
Active hooks can be configured to trigger for one or more service supported
46-
events. In other words, the service must support listening for the event you
45+
Active hooks can be configured to trigger for one or more service supported
46+
events. In other words, the service must support listening for the event you
4747
want to trigger.
4848

49-
For example, the
49+
For example, the
5050
[Web](https://github.com/github/github-services/blob/master/lib/services/web.rb)
5151
service listens for all events, while the
5252
[IRC](https://github.com/github/github-services/blob/master/lib/services/irc.rb)
@@ -80,13 +80,13 @@ Name | Description
8080

8181
The payloads for all hooks mirror [the payloads for the Event
8282
types](/v3/activity/events/types/), with the exception of [the original `push`
83-
event](http://help.github.com/post-receive-hooks/),
83+
event](http://help.github.com/post-receive-hooks/),
8484
which has a more detailed payload.
8585

8686

8787
## JSON HTTP
8888

89-
The JSON HTTP API follows the same conventions as the rest of the
89+
The JSON HTTP API follows the same conventions as the rest of the
9090
[GitHub API](http://developer.github.com/v3/).
9191

9292
### List
@@ -113,7 +113,7 @@ The JSON HTTP API follows the same conventions as the rest of the
113113

114114
#### Parameter
115115

116-
Name | Type | Description
116+
Name | Type | Description
117117
-----|------|--------------
118118
`name`|`string` | **Required**. The name of the service that is being called. (See [/hooks](https://api.github.com/hooks) for the list of valid hook names.)
119119
`config`|`hash` | **Required**. Key/value pairs to provide settings for this hook. 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.
@@ -125,7 +125,7 @@ Name | Type | Description
125125
The ["web" service hook](https://github.com/github/github-services/blob/master/lib/services/web.rb#L4-11)
126126
takes these fields in the `config`:
127127

128-
Name | Type | Description
128+
Name | Type | Description
129129
-----|------|--------------
130130
`url`|`string` | **Required**. The URL to which the payloads will be delivered.
131131
`content_type`|`string` | The media type used to serialize the payloads. Supported values: `json` and `form`. Default: `form`.
@@ -251,7 +251,7 @@ exists, it will be modified according to the request.
251251

252252
#### Parameters
253253

254-
Name | Type | Description
254+
Name | Type | Description
255255
-----|------|--------------
256256
``hub.mode``|`string` | **Required**. Either `subscribe` or `unsubscribe`.
257257
``hub.topic``|`string` |**Required**. The URI of the GitHub repository to subscribe to. The path must be in the format of `/:owner/:repo/events/:event`.

content/v3/troubleshooting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ in order to get more results.
3030
It's important to *not* try and guess the format of the pagination URL. Not every
3131
API call uses the same structure. Instead, extract the pagination information from
3232
[the Link Header](/v3/#pagination), which is sent with every request.
33-
33+
3434
## Can I get my rate limits bumped?
3535

3636
The GitHub API has a pretty lenient quota for rate limits, for your enjoyment and
@@ -43,7 +43,7 @@ In certain exceptional cases, we may temporarily bump your rate limit higher. Yo
4343
should be prepared to answer technical questions about your goal and your planned usage of the API. We may still choose not to bump your limit if we feel that you can achieve your wildest
4444
dreams with the current rate limit (but don't worry, we'll help you out).
4545

46-
## Why can't my server with SSL receive WebHooks?
46+
## Why can't my server with SSL receive Webhooks?
4747

4848
When we send events to your server, we attempt to negotiate either SSL version 2 or 3.
4949
If your server requires a specific SSL version and does not support SSL negotiation,

content/webhooks/configuring/index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
title: Configuring Your Server | GitHub API
3-
layout: hooks
3+
layout: webhooks
44
---
55

66
# Configuring Your Server
77

88
* TOC
99
{:toc}
1010

11-
Now that our hook is ready to deliver messages, we'll set up a basic Sinatra server
12-
to handle incoming payloads.
11+
Now that our hook is ready to deliver messages, we'll set up a basic Sinatra server
12+
to handle incoming payloads.
1313

1414
Recall that we specifically set our webhook URL to `http://localhost:4567/payload`.
1515
Since we're developing locally, we'll need to expose our local development environment
@@ -34,7 +34,7 @@ on the command line. You should see a line that looks something like this:
3434
Copy that funky `*.ngrok.com` URL! We're now going to go *back* to the Payload
3535
URL and pasting this server into that field. It should look something like `http://7e9ea9dc.ngrok.com/payload`.
3636

37-
By doing this, we've set ourselves up to expose our localhost at path `/payload`
37+
By doing this, we've set ourselves up to expose our localhost at path `/payload`
3838
to the Internet.
3939

4040
## Writing the server
@@ -44,13 +44,13 @@ because that's where we told GitHub our webhook URL was. Since ngrok is exposing
4444
our local environment, we don't need to set up a real server someone online, and
4545
can happily test out our code locally.
4646

47-
Let's set up a little Sinatra app to do something with the information. Our initial
47+
Let's set up a little Sinatra app to do something with the information. Our initial
4848
setup might look something like this:
4949

5050
#!ruby
5151
require 'sinatra'
5252
require 'json'
53-
53+
5454
post '/payload' do
5555
push = JSON.parse(params[:payload])
5656
puts "I got some JSON: #{push.inspect}"
@@ -65,7 +65,7 @@ and create a new Issue on the repository you're testing with. Once you create
6565
it, switch back to your terminal. You should see something like this in your output:
6666

6767
#!bash
68-
[adding-hooks]* ~/github/platform-samples/hooks/ruby/configuring-your-server $ ruby server.rb
68+
[adding-hooks]* ~/github/platform-samples/hooks/ruby/configuring-your-server $ ruby server.rb
6969
== Sinatra/1.4.4 has taken the stage on 4567 for development with backup from Thin
7070
>> Thin web server (v1.5.1 codename Straight Razor)
7171
>> Maximum connections set to 1024

content/webhooks/creating/index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
---
2-
title: Creating Hooks | GitHub API
3-
layout: hooks
2+
title: Creating Webhooks | GitHub API
3+
layout: webhooks
44
---
55

6-
# Creating Hooks
6+
# Creating Webhooks
77

88
* TOC
99
{:toc}
1010

11-
At their core, Hooks are post-receive messages that deliver a payload of
12-
information about activity in a repository. Hooks can trigger across several
11+
At their core, webhooks are events generated by GitHub that deliver a payload of
12+
information about activity in a repository. Webhooks can trigger across several
1313
different actions. For example, you can fire a payload of information any time
1414
a commit is made, a repository is forked, or an issue is created.
1515

16-
In this tutorial, our hook will be responsible for listing out how popular our
16+
In this tutorial, our hook will be responsible for listing out how popular our
1717
repository is, based on the number of Issues it receives per day.
1818

1919
Creating a hook is a two-step process. You'll first need to set up how you want
2020
your hook to behave through GitHub--what events should it listen to, and what
21-
fields (if any) should be passed along. After that, you'll manage how to receive
21+
fields (if any) should be passed along. After that, you'll manage how to receive
2222
the payload on your server.
2323

2424
## Setting up a Hook
@@ -34,11 +34,11 @@ can take advantage of. We'll go through each of these below.
3434
This is the server endpoint that will receive the hook payload.
3535

3636
Since we're developing locally for our tutorial, let's set it to `http://localhost:4567/payload`.
37-
We'll explain why in the [Configuring Your Server](/hooks/configuring/) docs.
37+
We'll explain why in the [Configuring Your Server](/hooks/configuring/) docs.
3838

3939
## Payload version
4040

41-
Webhooks can deliver various [media types](/v3/media/) as defined by the GitHub API.
41+
Webhooks can deliver various [media types](/v3/media/) as defined by the GitHub API.
4242
Choose the one that best fits your needs. For this tutorial, the default format is fine.
4343

4444
## Events
@@ -51,7 +51,7 @@ A full list of hooks, and when they execute, can be found in [the hooks API][hoo
5151
Since our hook is dealing with Issues in a repository, we'll click on **Issues**,
5252
and toggle the options there.
5353

54-
When you're finished, click on **Add webhook**. Phew! Now that the hook is created,
54+
When you're finished, click on **Add webhook**. Phew! Now that the hook is created,
5555
it's time to set up our local server to test the webhook. Head on over to
5656
[Configuring Your Server](/hooks/configuring/) to learn how to do that.
5757

content/webhooks/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Hooks | GitHub API
3-
layout: hooks
2+
title: Webhooks | GitHub API
3+
layout: webhooks
44
---
55

66
Every GitHub repository has the option to communicate with a web server whenever

content/webhooks/testing/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
2-
title: Testing Hooks | GitHub API
3-
layout: hooks
2+
title: Testing Webhooks | GitHub API
3+
layout: webhooks
44
---
55

6-
# Testing Hooks
6+
# Testing Webhooks
77

88
* TOC
99
{:toc}
1010

1111
Now that you've [configured your local server](/hooks/configuring/), you might
12-
be interested in pushing your code to the limits. To that end, GitHub's webhooks
12+
be interested in pushing your code to the limits. To that end, GitHub's webhooks
1313
view provides some tooling for testing your deployed payloads.
1414

1515

@@ -35,6 +35,6 @@ It also includes details about the JSON payload.
3535

3636
## Response
3737

38-
The response tab lists how your server replied once it received the payload from
38+
The response tab lists how your server replied once it received the payload from
3939
GitHub. This includes the status code, the headers, and any additional data
4040
within the response body.
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<%= render 'head' %>
22

3-
<body class="hooks">
3+
<body class="webhooks">
44
<%= render 'header' %>
5-
5+
66
<div class="sub-nav">
7-
<h2><a href="/v3/">Hooks</a></h2>
8-
7+
<h2><a href="/v3/">Webhooks</a></h2>
8+
99
<ul>
1010

1111
</ul>
1212
</div>
13-
13+
1414
<div id="wrapper">
1515
<div class="content">
1616
<%= yield %>
@@ -19,19 +19,19 @@ <h2><a href="/v3/">Hooks</a></h2>
1919
<div id="js-sidebar" class="sidebar-shell">
2020
<div class="sidebar-module">
2121
<ul>
22-
<li><h3><a href="/hooks/creating">Creating Hooks</a></h3></li>
23-
<li><h3><a href="/hooks/configuring/">Configuring Your Server</a></h3></li>
24-
<li><h3><a href="/hooks/testing/">Testing Hooks</a></h3></li>
22+
<li><h3><a href="/webhooks/creating">Creating Webhooks</a></h3></li>
23+
<li><h3><a href="/webhooks/configuring/">Configuring Your Server</a></h3></li>
24+
<li><h3><a href="/webhooks/testing/">Testing Webhooks</a></h3></li>
2525
</ul>
2626
</div>
27-
27+
2828
<div class="sidebar-module notice">
2929
<p>This website is a <a href="https://github.com/github/developer.github.com" target="_blank">public GitHub repository</a>. Please help us by forking the project and adding to it.</p>
3030
</div>
3131
<div class="sidebar-module api-status"><a href="https://status.github.com" class="unknown">API Status</a></div>
3232
</div><!-- sidebar-shell -->
3333
</div><!-- #wrapper -->
34-
34+
3535
<%= render 'footer' %>
3636
</body>
3737
</html>

0 commit comments

Comments
 (0)