1
0
mirror of synced 2025-12-21 10:57:10 -05:00

[Shipping 10.23.20] add webhook config REST API (#16144)

* add webhook config REST API

* add versioning for dotcom/2.23+

* check for empty parameters with request bodies

* add latest rest-api-operation module

* Apply suggestions from code review

Co-authored-by: jmarlena <6732600+jmarlena@users.noreply.github.com>
This commit is contained in:
Rachael Sewell
2020-10-26 17:25:09 -07:00
committed by GitHub
parent 6c62a5920d
commit 13c33d4039
9 changed files with 30 additions and 13 deletions

View File

@@ -14,6 +14,9 @@ Now that we understand [the basics of webhooks][webhooks-overview], let's go thr
Creating a webhook is a two-step process. You'll first need to set up how you want your webhook to behave through {% data variables.product.product_name %}--what events should it listen to. After that, you'll set up your server to receive and manage the payload.
{% data reusables.webhooks.webhooks-rest-api-links %}
### Setting up a Webhook
You can install webhooks on an organization or on a specific repository.

View File

@@ -12,6 +12,7 @@ versions:
Once your server is configured to receive payloads, it'll listen for any payload sent to the endpoint you configured. For security reasons, you probably want to limit requests to those coming from GitHub. There are a few ways to go about this--for example, you could opt to allow requests from GitHub's IP address--but a far easier method is to set up a secret token and validate the information.
{% data reusables.webhooks.webhooks-rest-api-links %}
### Setting your secret token