Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to and reorder GitHub webhook docs #5514

Merged
merged 1 commit into from
Mar 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions docs/webhooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ To manually set up a webhook, go to :guilabel:`Admin` > :guilabel:`Integrations`
dashboard page and select the integration type you'd like to add.
After you have added the integration, you'll see a link to information about the integration.

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

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

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

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

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.
Push changes to your repository and webhooks will work from this point.

.. note:: The webhook token, intended for the GitHub **Secret** field, is not yet implemented.

.. _webhook-integration-bitbucket:
Expand Down