Skip to content

Commit

Permalink
Hack Week 2025: update variables product_name and prodname_dotcom
Browse files Browse the repository at this point in the history
… in content/webhooks (#53978)
  • Loading branch information
vgrl authored Jan 19, 2025
1 parent 7a05809 commit e6a16fc
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion content/webhooks/about-webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
14 changes: 7 additions & 7 deletions content/webhooks/types-of-webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 %}

Expand All @@ -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 %}

Expand All @@ -63,22 +63,22 @@ 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

You can create webhooks to subscribe to events relating to {% data variables.product.prodname_sponsors %}. You can only create up to {% ifversion ghes %}250{% else %}20{% endif %} webhooks for a {% data variables.product.prodname_sponsors %} account.

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 %}

## {% data variables.product.prodname_github_app %} webhooks

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).
16 changes: 8 additions & 8 deletions content/webhooks/using-webhooks/creating-webhooks.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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).

Expand All @@ -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 %}
Expand All @@ -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**.
Expand All @@ -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 %}

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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 %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Loading

0 comments on commit e6a16fc

Please sign in to comment.