diff --git a/content/webhooks/about-webhooks.md b/content/webhooks/about-webhooks.md index 5134022d61ae..723785bd2ad4 100644 --- a/content/webhooks/about-webhooks.md +++ b/content/webhooks/about-webhooks.md @@ -36,7 +36,7 @@ Webhooks are used in a wide range of scenarios, including: * Deploying to a production server. * Logging events as they happen on {% data variables.product.company_short %}, for audit purposes. -## About webhooks on {% data variables.product.prodname_dotcom %} +## About webhooks on {% data variables.product.github %} When you create a webhook, you specify a URL and subscribe to events that occur on {% data variables.product.company_short %}. When an event that your webhook is subscribed to occurs, {% data variables.product.company_short %} will send an HTTP request with data about the event to the URL that you specified. If your server is set up to listen for webhook deliveries at that URL, it can take action when it receives one. diff --git a/content/webhooks/types-of-webhooks.md b/content/webhooks/types-of-webhooks.md index 83f5f21fd5d6..54f22174f224 100644 --- a/content/webhooks/types-of-webhooks.md +++ b/content/webhooks/types-of-webhooks.md @@ -31,7 +31,7 @@ You can create webhooks in a repository to subscribe to events that occur in tha You can create multiple webhooks in a single repository. However, you can only create up to {% ifversion ghes %}250{% else %}20{% endif %} webhooks that subscribe to each individual event type. For example, in a single repository you could only create up to {% ifversion ghes %}250{% else %}20{% endif %} different webhooks that each subscribe to the `push` event. -You can use the {% data variables.product.prodname_dotcom %} web interface or the REST API to manage repository webhooks. For more information, see [AUTOTITLE](/webhooks/using-webhooks/creating-webhooks#creating-a-repository-webhook), [AUTOTITLE](/webhooks/using-webhooks/editing-webhooks#editing-a-repository-webhook), and [AUTOTITLE](/webhooks/using-webhooks/disabling-webhooks#disabling-a-repository-webhook). For more information about using the REST API to manage repository webhooks, see [AUTOTITLE](/rest/webhooks). +You can use the {% data variables.product.github %} web interface or the REST API to manage repository webhooks. For more information, see [AUTOTITLE](/webhooks/using-webhooks/creating-webhooks#creating-a-repository-webhook), [AUTOTITLE](/webhooks/using-webhooks/editing-webhooks#editing-a-repository-webhook), and [AUTOTITLE](/webhooks/using-webhooks/disabling-webhooks#disabling-a-repository-webhook). For more information about using the REST API to manage repository webhooks, see [AUTOTITLE](/rest/webhooks). ## Organization webhooks @@ -41,7 +41,7 @@ You must be an organization owner to create and manage webhooks in an organizati You can create multiple webhooks in a single organization. However, you can only create up to {% ifversion ghes %}250{% else %}20{% endif %} webhooks that subscribe to each individual event type. For example, in a single organization you could only create up to {% ifversion ghes %}250{% else %}20{% endif %} different webhooks that each subscribe to the `push` event. -You can use the {% data variables.product.prodname_dotcom %} web interface or the REST API to manage organization webhooks. For more information, see [AUTOTITLE](/webhooks/using-webhooks/creating-webhooks#creating-an-organization-webhook), [AUTOTITLE](/webhooks/using-webhooks/editing-webhooks#editing-an-organization-webhook), and [AUTOTITLE](/webhooks/using-webhooks/disabling-webhooks#disabling-an-organization-webhook). For more information about using the REST API to manage organization webhooks, see [AUTOTITLE](/rest/orgs/webhooks). +You can use the {% data variables.product.github %} web interface or the REST API to manage organization webhooks. For more information, see [AUTOTITLE](/webhooks/using-webhooks/creating-webhooks#creating-an-organization-webhook), [AUTOTITLE](/webhooks/using-webhooks/editing-webhooks#editing-an-organization-webhook), and [AUTOTITLE](/webhooks/using-webhooks/disabling-webhooks#disabling-an-organization-webhook). For more information about using the REST API to manage organization webhooks, see [AUTOTITLE](/rest/orgs/webhooks). {% ifversion ghes or ghec %} @@ -51,7 +51,7 @@ Enterprise owners can create global webhooks to subscribe to events that occur w You can create multiple webhooks in a single enterprise. However, you can only create up to {% ifversion ghes %}250{% else %}20{% endif %} webhooks that subscribe to each individual event type. For example, in a single enterprise you could only create up to {% ifversion ghes %}250{% else %}20{% endif %} different webhooks that each subscribe to the `membership` event. -You can use the {% data variables.product.prodname_dotcom %} web interface to manage global webhooks. For more information, see [AUTOTITLE](/webhooks/using-webhooks/creating-webhooks#creating-a-global-webhook-for-a-github-enterprise), [AUTOTITLE](/webhooks/using-webhooks/editing-webhooks#editing-a-global-webhook-for-a-github-enterprise), and [AUTOTITLE](/webhooks/using-webhooks/disabling-webhooks#disabling-a-global-webhook-for-a-github-enterprise). {% data reusables.enterprise_user_management.manage-global-webhooks-api %} +You can use the {% data variables.product.github %} web interface to manage global webhooks. For more information, see [AUTOTITLE](/webhooks/using-webhooks/creating-webhooks#creating-a-global-webhook-for-a-github-enterprise), [AUTOTITLE](/webhooks/using-webhooks/editing-webhooks#editing-a-global-webhook-for-a-github-enterprise), and [AUTOTITLE](/webhooks/using-webhooks/disabling-webhooks#disabling-a-global-webhook-for-a-github-enterprise). {% data reusables.enterprise_user_management.manage-global-webhooks-api %} {% endif %} @@ -63,7 +63,7 @@ You can create a webhook to subscribe to events relating to an app that you publ A {% data variables.product.prodname_marketplace %} webhook cannot be deleted, but you can deactivate it to stop receiving webhook deliveries. -You can use the {% data variables.product.prodname_dotcom %} web interface to manage a {% data variables.product.prodname_marketplace %} webhook. For more information, see [AUTOTITLE](/webhooks/using-webhooks/creating-webhooks#creating-a-github-marketplace-webhook), [AUTOTITLE](/webhooks/using-webhooks/editing-webhooks#editing-a-github-marketplace-webhook), and [AUTOTITLE](/webhooks/using-webhooks/disabling-webhooks#disabling-a-github-marketplace-webhook). +You can use the {% data variables.product.github %} web interface to manage a {% data variables.product.prodname_marketplace %} webhook. For more information, see [AUTOTITLE](/webhooks/using-webhooks/creating-webhooks#creating-a-github-marketplace-webhook), [AUTOTITLE](/webhooks/using-webhooks/editing-webhooks#editing-a-github-marketplace-webhook), and [AUTOTITLE](/webhooks/using-webhooks/disabling-webhooks#disabling-a-github-marketplace-webhook). ## {% data variables.product.prodname_sponsors %} webhooks @@ -71,7 +71,7 @@ You can create webhooks to subscribe to events relating to {% data variables.pro You must be an account owner or have admin access in the sponsored account to manage sponsorship webhooks. -You can use the {% data variables.product.prodname_dotcom %} web interface to manage {% data variables.product.prodname_sponsors %} webhooks. For more information, see [AUTOTITLE](/webhooks/using-webhooks/creating-webhooks#creating-a-github-sponsors-webhook), [AUTOTITLE](/webhooks/using-webhooks/editing-webhooks#editing-a-github-sponsors-webhook), and [AUTOTITLE](/webhooks/using-webhooks/disabling-webhooks#disabling-a-github-sponsors-webhook). +You can use the {% data variables.product.github %} web interface to manage {% data variables.product.prodname_sponsors %} webhooks. For more information, see [AUTOTITLE](/webhooks/using-webhooks/creating-webhooks#creating-a-github-sponsors-webhook), [AUTOTITLE](/webhooks/using-webhooks/editing-webhooks#editing-a-github-sponsors-webhook), and [AUTOTITLE](/webhooks/using-webhooks/disabling-webhooks#disabling-a-github-sponsors-webhook). {% endif %} @@ -79,6 +79,6 @@ You can use the {% data variables.product.prodname_dotcom %} web interface to ma You can configure a {% data variables.product.prodname_github_app %} to receive webhooks when specific events occur in a repository or organization that the app has been granted access to. -Each {% data variables.product.prodname_github_app %} has a single webhook that is automatically created by {% data variables.product.prodname_dotcom %}. By default, the webhook is not subscribed to any events. You can configure the events that the webhook subscribes to. A {% data variables.product.prodname_github_app %} webhook cannot be deleted, but you can deactivate it to stop receiving webhook deliveries. +Each {% data variables.product.prodname_github_app %} has a single webhook that is automatically created by {% data variables.product.github %}. By default, the webhook is not subscribed to any events. You can configure the events that the webhook subscribes to. A {% data variables.product.prodname_github_app %} webhook cannot be deleted, but you can deactivate it to stop receiving webhook deliveries. -You can use the {% data variables.product.prodname_dotcom %} web interface or the REST API to manage a {% data variables.product.prodname_github_app %} webhook. For more information, see [AUTOTITLE](/webhooks/using-webhooks/creating-webhooks#creating-webhooks-for-a-github-app), [AUTOTITLE](/webhooks/using-webhooks/editing-webhooks#editing-webhooks-for-a-github-app), and [AUTOTITLE](/webhooks/using-webhooks/disabling-webhooks#disabling-webhooks-for-a-github-app). For more information about using the REST API to manage {% data variables.product.prodname_github_app %} webhooks, see [AUTOTITLE](/rest/apps/webhooks). +You can use the {% data variables.product.github %} web interface or the REST API to manage a {% data variables.product.prodname_github_app %} webhook. For more information, see [AUTOTITLE](/webhooks/using-webhooks/creating-webhooks#creating-webhooks-for-a-github-app), [AUTOTITLE](/webhooks/using-webhooks/editing-webhooks#editing-webhooks-for-a-github-app), and [AUTOTITLE](/webhooks/using-webhooks/disabling-webhooks#disabling-webhooks-for-a-github-app). For more information about using the REST API to manage {% data variables.product.prodname_github_app %} webhooks, see [AUTOTITLE](/rest/apps/webhooks). diff --git a/content/webhooks/using-webhooks/creating-webhooks.md b/content/webhooks/using-webhooks/creating-webhooks.md index 56dc094cf4ed..ab1439247578 100644 --- a/content/webhooks/using-webhooks/creating-webhooks.md +++ b/content/webhooks/using-webhooks/creating-webhooks.md @@ -1,7 +1,7 @@ --- title: Creating webhooks shortTitle: Create webhooks -intro: 'You can create webhooks to subscribe to specific events that occur on {% data variables.product.prodname_dotcom %}.' +intro: 'You can create webhooks to subscribe to specific events that occur on {% data variables.product.github %}.' redirect_from: - /webhooks/creating - /developers/webhooks-and-events/creating-webhooks @@ -19,7 +19,7 @@ topics: ## About creating webhooks -You can create webhooks to subscribe to specific events on {% data variables.product.prodname_dotcom %} that occur in a repository, organization, {% ifversion ghes or ghec %}{% data variables.product.prodname_enterprise %}, {% endif %} {% ifversion fpt or ghec %}{% data variables.product.prodname_marketplace %} account, {% endif %} {% ifversion fpt or ghec %}{% data variables.product.prodname_sponsors %} account, {% endif %} or {% data variables.product.prodname_github_app %}. +You can create webhooks to subscribe to specific events on {% data variables.product.github %} that occur in a repository, organization, {% ifversion ghes or ghec %}{% data variables.product.prodname_enterprise %}, {% endif %} {% ifversion fpt or ghec %}{% data variables.product.prodname_marketplace %} account, {% endif %} {% ifversion fpt or ghec %}{% data variables.product.prodname_sponsors %} account, {% endif %} or {% data variables.product.prodname_github_app %}. For more information about the different types of webhooks, see [AUTOTITLE](/webhooks/types-of-webhooks). @@ -29,7 +29,7 @@ For a complete list of webhook events, see [AUTOTITLE](/webhooks/webhook-events- You can create a webhook to subscribe to events that occur in a specific repository. You must be a repository owner or have admin access in the repository to create webhooks in that repository. -You can use the {% data variables.product.prodname_dotcom %} web interface or the REST API to create a repository webhook. For more information about using the REST API to create a repository webhook, see [AUTOTITLE](/rest/webhooks/repos#create-a-repository-webhook). +You can use the {% data variables.product.github %} web interface or the REST API to create a repository webhook. For more information about using the REST API to create a repository webhook, see [AUTOTITLE](/rest/webhooks/repos#create-a-repository-webhook). {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} @@ -42,13 +42,13 @@ You can use the {% data variables.product.prodname_dotcom %} web interface or th 1. To make the webhook active immediately after adding the configuration, select **Active**. {% data reusables.webhooks.add_webhook_button %} -After you create a new webhook, {% data variables.product.prodname_dotcom %} will send you a simple `ping` event to let you know you've set up the webhook correctly. For more information, see [AUTOTITLE](/webhooks/webhook-events-and-payloads#ping). +After you create a new webhook, {% data variables.product.github %} will send you a simple `ping` event to let you know you've set up the webhook correctly. For more information, see [AUTOTITLE](/webhooks/webhook-events-and-payloads#ping). ## Creating an organization webhook You can create a webhook to subscribe to events that occur in a specific organization. You must be an organization owner to create webhooks in that organization. -You can use the {% data variables.product.prodname_dotcom %} web interface or the REST API to create an organization webhook. For more information about using the REST API to create an organization webhook, see [AUTOTITLE](/rest/orgs/webhooks#create-an-organization-webhook). +You can use the {% data variables.product.github %} web interface or the REST API to create an organization webhook. For more information about using the REST API to create an organization webhook, see [AUTOTITLE](/rest/orgs/webhooks#create-an-organization-webhook). 1. In the upper-right corner of any page on {% data variables.product.github %}, click your profile photo. 1. Click **Your organizations**. @@ -62,7 +62,7 @@ You can use the {% data variables.product.prodname_dotcom %} web interface or th 1. To make the webhook active immediately after adding the configuration, select **Active**. 1. Click **Add webhook**. -After you create a new webhook, {% data variables.product.prodname_dotcom %} will send you a simple `ping` event to let you know you've set up the webhook correctly. For more information, see [AUTOTITLE](/webhooks/webhook-events-and-payloads#ping). +After you create a new webhook, {% data variables.product.github %} will send you a simple `ping` event to let you know you've set up the webhook correctly. For more information, see [AUTOTITLE](/webhooks/webhook-events-and-payloads#ping). {% ifversion ghes or ghec %} @@ -108,7 +108,7 @@ You can create a webhook to subscribe to events relating to an app that you publ 1. To make the webhook active immediately after adding the configuration, select **Active**. 1. Click **Create webhook**. -After you create a new webhook, {% data variables.product.prodname_dotcom %} will send you a simple `ping` event to let you know you've set up the webhook correctly. For more information, see [AUTOTITLE](/webhooks/webhook-events-and-payloads#ping). +After you create a new webhook, {% data variables.product.github %} will send you a simple `ping` event to let you know you've set up the webhook correctly. For more information, see [AUTOTITLE](/webhooks/webhook-events-and-payloads#ping). ## Creating a {% data variables.product.prodname_sponsors %} webhook @@ -140,7 +140,7 @@ To configure a webhook for an existing {% data variables.product.prodname_github 1. Next to the {% data variables.product.prodname_github_app %} that you want to configure the webhook for, click **Edit**. 1. Under "Webhook," select **Active**. 1. Under "Webhook URL", type the URL where you'd like to receive payloads. -1. Optionally, under "Webhook secret", type a string to use as a `secret` key. You should choose a random string of text with high entropy. You can use the webhook secret to limit incoming requests to only those originating from {% data variables.product.prodname_dotcom %}. For more information, see [AUTOTITLE](/webhooks/using-webhooks/securing-your-webhooks). +1. Optionally, under "Webhook secret", type a string to use as a `secret` key. You should choose a random string of text with high entropy. You can use the webhook secret to limit incoming requests to only those originating from {% data variables.product.github %}. For more information, see [AUTOTITLE](/webhooks/using-webhooks/securing-your-webhooks). 1. Click **Save changes**. 1. In the sidebar, click **Permissions & events**. 1. {% data reusables.apps.webhooks-and-apps %} diff --git a/content/webhooks/using-webhooks/delivering-webhooks-to-private-systems.md b/content/webhooks/using-webhooks/delivering-webhooks-to-private-systems.md index db3a0092c105..7c3a63c598fb 100644 --- a/content/webhooks/using-webhooks/delivering-webhooks-to-private-systems.md +++ b/content/webhooks/using-webhooks/delivering-webhooks-to-private-systems.md @@ -28,12 +28,12 @@ When deploying a reverse proxy, you should follow all practices recommended by y ### Limiting inbound traffic to {% data variables.product.company_short %} webhooks -You should configure your reverse proxy to only allow HTTPS POST requests from the subset of {% data variables.product.prodname_dotcom %} IP ranges that are used to deliver webhooks. This ensures that your reverse proxy does not process or forward other requests. +You should configure your reverse proxy to only allow HTTPS POST requests from the subset of {% data variables.product.github %} IP ranges that are used to deliver webhooks. This ensures that your reverse proxy does not process or forward other requests. The [`/meta` endpoint](/rest/meta/meta#get-github-meta-information) returns a JSON object listing GitHub's IP ranges. IP ranges used to deliver webhooks are listed in the `hooks` element. ### Validating webhook payloads -If your webhook is configured with a secret token, {% data variables.product.prodname_dotcom %} will include a cryptographic hash of each webhook payload. You should use this hash to validate the payload received from {% data variables.product.prodname_dotcom %} before any action is taken by your private system. For more information, see [AUTOTITLE](/webhooks-and-events/webhooks/securing-your-webhooks). +If your webhook is configured with a secret token, {% data variables.product.github %} will include a cryptographic hash of each webhook payload. You should use this hash to validate the payload received from {% data variables.product.github %} before any action is taken by your private system. For more information, see [AUTOTITLE](/webhooks-and-events/webhooks/securing-your-webhooks). You can implement payload validation either on the reverse proxy or on your private system. diff --git a/content/webhooks/using-webhooks/disabling-webhooks.md b/content/webhooks/using-webhooks/disabling-webhooks.md index 7716214cfd2c..d2031fa79a1e 100644 --- a/content/webhooks/using-webhooks/disabling-webhooks.md +++ b/content/webhooks/using-webhooks/disabling-webhooks.md @@ -1,7 +1,7 @@ --- title: Disabling webhooks shortTitle: Disable webhooks -intro: 'You can disable a webhook to unsubscribe from events that occur on {% data variables.product.prodname_dotcom %}.' +intro: 'You can disable a webhook to unsubscribe from events that occur on {% data variables.product.github %}.' versions: fpt: '*' ghes: '*' @@ -26,7 +26,7 @@ For more information, see [AUTOTITLE](/webhooks/about-webhooks) and [AUTOTITLE]( To disable a repository webhook, you can deactivate or delete it. You must be a repository owner, or have admin access in the repository, to disable webhooks. -You can use the {% data variables.product.prodname_dotcom %} web interface or the REST API to delete a webhook for a repository. For more information about using the REST API to delete a repository webhook, see [AUTOTITLE](/rest/webhooks/repos#delete-a-repository-webhook). +You can use the {% data variables.product.github %} web interface or the REST API to delete a webhook for a repository. For more information about using the REST API to delete a repository webhook, see [AUTOTITLE](/rest/webhooks/repos#delete-a-repository-webhook). {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} @@ -37,7 +37,7 @@ You can use the {% data variables.product.prodname_dotcom %} web interface or th To disable an organization webhook, you can deactivate or delete it. Only organization owners can disable webhooks in an organization. -You can use the {% data variables.product.prodname_dotcom %} web interface or the REST API to delete an organization webhook. For more information about using the REST API to delete an organization webhook, see [AUTOTITLE](/rest/orgs/webhooks#delete-an-organization-webhook). +You can use the {% data variables.product.github %} web interface or the REST API to delete an organization webhook. For more information about using the REST API to delete an organization webhook, see [AUTOTITLE](/rest/orgs/webhooks#delete-an-organization-webhook). 1. In the upper-right corner of any page on {% data variables.product.github %}, click your profile photo. 1. Click **Your organizations**. diff --git a/content/webhooks/using-webhooks/editing-webhooks.md b/content/webhooks/using-webhooks/editing-webhooks.md index b7cadd6e5607..1c3a1eeda042 100644 --- a/content/webhooks/using-webhooks/editing-webhooks.md +++ b/content/webhooks/using-webhooks/editing-webhooks.md @@ -18,7 +18,7 @@ You can edit a webhook to change any of the settings that were selected when the You can edit a webhook that was created in a specific repository. You must be a repository owner or have admin access in the repository to edit webhooks in that repository. -You can use the {% data variables.product.prodname_dotcom %} web interface or the REST API to edit a repository webhook. For more information about using the REST API to edit a repository webhook, see [AUTOTITLE](/rest/webhooks/repos#update-a-repository-webhook). +You can use the {% data variables.product.github %} web interface or the REST API to edit a repository webhook. For more information about using the REST API to edit a repository webhook, see [AUTOTITLE](/rest/webhooks/repos#update-a-repository-webhook). {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} @@ -31,7 +31,7 @@ You can use the {% data variables.product.prodname_dotcom %} web interface or th You can edit a webhook that was created in a specific organization. You must be an organization owner to edit webhooks in that organization. -You can use the {% data variables.product.prodname_dotcom %} web interface or the REST API to edit an organization webhook. For more information about using the REST API to create an organization webhook, see [AUTOTITLE](/rest/orgs/webhooks#update-an-organization-webhook). +You can use the {% data variables.product.github %} web interface or the REST API to edit an organization webhook. For more information about using the REST API to create an organization webhook, see [AUTOTITLE](/rest/orgs/webhooks#update-an-organization-webhook). {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} diff --git a/content/webhooks/using-webhooks/validating-webhook-deliveries.md b/content/webhooks/using-webhooks/validating-webhook-deliveries.md index ab853f7a31e4..8148165d6d09 100644 --- a/content/webhooks/using-webhooks/validating-webhook-deliveries.md +++ b/content/webhooks/using-webhooks/validating-webhook-deliveries.md @@ -26,7 +26,7 @@ To do this, you need to: 1. Create a secret token for a webhook. 1. Store the token securely on your server. -1. Validate incoming webhook payloads against the token, to verify that they are coming from {% data variables.product.prodname_dotcom %} and were not tampered with. +1. Validate incoming webhook payloads against the token, to verify that they are coming from {% data variables.product.github %} and were not tampered with. ## Creating a secret token @@ -41,13 +41,13 @@ After creating a secret token, you should store it in a secure location that you ## Validating webhook deliveries -{% data variables.product.product_name %} will use your secret token to create a hash signature that's sent to you with each payload. The hash signature will appear in each delivery as the value of the `X-Hub-Signature-256` header. For more information, see [AUTOTITLE](/webhooks/webhook-events-and-payloads#delivery-headers). +{% data variables.product.github %} will use your secret token to create a hash signature that's sent to you with each payload. The hash signature will appear in each delivery as the value of the `X-Hub-Signature-256` header. For more information, see [AUTOTITLE](/webhooks/webhook-events-and-payloads#delivery-headers). In your code that handles webhook deliveries, you should calculate a hash using your secret token. Then, compare the hash that {% data variables.product.company_short %} sent with the expected hash that you calculated, and ensure that they match. For examples showing how to validate the hashes in various programming languages, see [Examples](#examples). There are a few important things to keep in mind when validating webhook payloads: -* {% data variables.product.product_name %} uses an HMAC hex digest to compute the hash. +* {% data variables.product.github %} uses an HMAC hex digest to compute the hash. * The hash signature always starts with `sha256=`. * The hash signature is generated using your webhook's secret token and the payload contents. * If your language and server implementation specifies a character encoding, ensure that you handle the payload as UTF-8. Webhook payloads can contain unicode characters.