Skip to content

Commit 5ed7677

Browse files
authored
Merge pull request readthedocs#5514 from davidjb/patch-1
Add to and reorder GitHub webhook docs
2 parents 9e853e9 + 851f7d5 commit 5ed7677

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docs/webhooks.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ To manually set up a webhook, go to :guilabel:`Admin` > :guilabel:`Integrations`
3434
dashboard page and select the integration type you'd like to add.
3535
After you have added the integration, you'll see a link to information about the integration.
3636

37-
As an example, the URL pattern looks like this: *readthedocs.org/api/v2/webhook/<project-name>/<id>/*.
37+
As an example, the URL pattern looks like this: *https://readthedocs.org/api/v2/webhook/<project-name>/<id>/*.
3838

3939
Use this URL when setting up a new webhook with your provider -- these steps vary depending on the provider:
4040

@@ -50,15 +50,19 @@ GitHub
5050
You may need to prepend *https://* to the URL.
5151
* For **Content type**, both *application/json* and
5252
*application/x-www-form-urlencoded* work
53-
* Select **Let me select individual events**,
54-
and mark **Pushes**, **Branch or tag creation**, and **Branch or tag deletion** events
5553
* Leave the **Secrets** field blank
56-
* Finish by clicking **Add webhook**
54+
* Select **Let me select individual events**,
55+
and mark **Branch or tag creation**, **Branch or tag deletion** and **Pushes** events
56+
* Ensure **Active** is enabled; it is by default
57+
* Finish by clicking **Add webhook**. You may be prompted to enter your GitHub password to confirm your action.
5758

5859
You can verify if the webhook is working at the bottom of the GitHub page under **Recent Deliveries**.
5960
If you see a Response 200, then the webhook is correctly configured.
6061
For a 403 error, it's likely that the Payload URL is incorrect.
6162

63+
GitHub will emit an initial HTTP request (`X-GitHub-Event: ping`) upon creating the webhook and you may notice that the Read the Docs responds with `{"detail":"Unhandled webhook event"}` – this is normal and expected.
64+
Push changes to your repository and webhooks will work from this point.
65+
6266
.. note:: The webhook token, intended for the GitHub **Secret** field, is not yet implemented.
6367

6468
.. _webhook-integration-bitbucket:

0 commit comments

Comments
 (0)