зеркало из https://github.com/github/docs.git
Consolidate and flush out webhook procedurals (#43817)
Co-authored-by: Jess Hosman <1183847+jhosman@users.noreply.github.com>
This commit is contained in:
Родитель
3da32a78fe
Коммит
55a2249afc
|
@ -35,47 +35,15 @@ For example, you can configure {% data variables.location.product_location %} to
|
|||
|
||||
## Adding a global webhook
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.hooks-tab %}
|
||||
1. Click **Add webhook**.
|
||||
1. In the "Payload URL" field, type the URL where you'd like to receive payloads.
|
||||
1. Optionally, select the **Content type** drop-down menu, and click a data format to receive the webhook payload in.
|
||||
1. Optionally, in the **Secret** field, type a string to use as a `secret` key.
|
||||
1. Optionally, if your payload URL is HTTPS and you would not like {% data variables.product.prodname_ghe_server %} to verify SSL certificates when delivering payloads, under "SSL verification", select **Disable**. Read the information about SSL verification, then click **Disable, I understand my webhooks may not be secure**.
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning:** SSL verification helps ensure that hook payloads are delivered securely. We do not recommend disabling SSL verification.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
1. Under "Which events would you like to trigger this webhook?", select if you'd like this webhook to trigger for every event or for selected events.
|
||||
- For every event, select **Send me everything**.
|
||||
- To choose specific events, select **Let me select individual events**.
|
||||
1. If you chose to select individual events, select the events that will trigger the webhook.
|
||||
1. To make the webhook active immediately after adding the configuration, select **Active**.
|
||||
1. Click **Add webhook**.
|
||||
You can add a global webhook for your enterprise. For more information, see "[AUTOTITLE](/webhooks/using-webhooks/creating-webhooks#creating-a-global-webhook-for-a-github-enterprise)."
|
||||
|
||||
## Editing a global webhook
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.hooks-tab %}
|
||||
1. Next to the webhook you'd like to edit, click **Edit**.
|
||||
You can edit a global webhook to change any of the settings that were selected when the webhook was initially created. For more information, see "[AUTOTITLE](/webhooks/using-webhooks/editing-webhooks#editing-a-global-webhook-for-a-github-enterprise)."
|
||||
|
||||
![Screenshot of the "Webhooks" page. To the right of a webhook, the "Edit" button is highlighted with an orange outline.](/assets/images/enterprise/site-admin-settings/edit-global-webhook-button.png)
|
||||
1. Update the webhook's settings.
|
||||
1. Click **Update webhook**.
|
||||
## Disabling a global webhook
|
||||
|
||||
## Deleting a global webhook
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.hooks-tab %}
|
||||
1. Next to the webhook you'd like to delete, click **Delete**.
|
||||
![Screenshot of the "Webhooks" page. To the right of a webhook, the "Delete" button is highlighted with an orange outline.](/assets/images/enterprise/site-admin-settings/delete-global-webhook-button.png)
|
||||
1. Read the information about deleting a webhook, then click **Yes, delete webhook**.
|
||||
You can disable or delete a global webhook. For more information, see "[AUTOTITLE](/webhooks/using-webhooks/disabling-webhooks#disabling-a-global-webhook-for-a-github-enterprise)."
|
||||
|
||||
## Viewing recent deliveries and responses
|
||||
|
||||
|
|
|
@ -18,14 +18,18 @@ shortTitle: Webhooks for events
|
|||
|
||||
To monitor changes to your sponsorships, such as cancellations at the end of a pay period, you can create webhooks for your sponsored user or organization account. When you set up a webhook for your sponsored account, you'll receive updates when sponsorships are created, edited, or deleted. For more information, see the [`sponsorship` webhook event](/webhooks-and-events/webhooks/webhook-events-and-payloads#sponsorship).
|
||||
|
||||
## Managing webhooks for events in your sponsored account
|
||||
## Adding a webhook
|
||||
|
||||
{% data reusables.sponsors.navigate-to-sponsors-dashboard %}
|
||||
{% data reusables.sponsors.navigate-to-webhooks-tab %}
|
||||
{% data reusables.sponsors.add-webhook %}
|
||||
{% data reusables.sponsors.add-payload-url %}
|
||||
{% data reusables.sponsors.webhook-content-formatting %}
|
||||
{% data reusables.sponsors.webhook-secret-token %}
|
||||
{% data reusables.sponsors.add-active-triggers %}
|
||||
{% data reusables.sponsors.confirm-add-webhook %}
|
||||
{% data reusables.sponsors.manage-existing-webhooks %}
|
||||
You can add a webhook for your sponsorship. For more information, see "[AUTOTITLE](/webhooks/using-webhooks/creating-webhooks#creating-a-github-sponsors-webhook)."
|
||||
|
||||
## Editing a webhook
|
||||
|
||||
You can edit a webhook to change any of the settings that were selected when the sponsorship webhook was initially created. For more information, see "[AUTOTITLE](/webhooks/using-webhooks/editing-webhooks#editing-a-github-sponsors-webhook)."
|
||||
|
||||
## Disabling a webhook
|
||||
|
||||
You can disable or delete a webhook for your sponsorship. For more information, see "[AUTOTITLE](/webhooks/using-webhooks/disabling-webhooks#disabling-a-github-sponsors-webhook)."
|
||||
|
||||
## Viewing recent deliveries and responses
|
||||
|
||||
You can view details about webhook deliveries that occurred in the past {% data variables.webhooks.retention %} days. For more information, see "[AUTOTITLE](/webhooks/testing-and-troubleshooting-webhooks/viewing-webhook-deliveries)."
|
||||
|
|
|
@ -59,7 +59,7 @@ You can use the {% data variables.product.prodname_dotcom %} web interface or th
|
|||
{% data reusables.webhooks.add_webhook_button %}
|
||||
1. Under "Payload URL", type the URL where you'd like to receive payloads.
|
||||
{% data reusables.webhooks.content_type_and_secret %}
|
||||
1. Under "Which events would you like to trigger this webhook?", select the types of webhooks you'd like to recieve. You should only subscribe to the webhook events that you need.
|
||||
1. Under "Which events would you like to trigger this webhook?", select the types of webhooks you'd like to receive. You should only subscribe to the webhook events that you need.
|
||||
1. If you chose **Let me select individual events**, select the events that will trigger the webhook.
|
||||
1. To make the webhook active immediately after adding the configuration, select **Active**.
|
||||
1. Click **Add webhook**.
|
||||
|
@ -70,7 +70,28 @@ After you create a new webhook, {% data variables.product.prodname_dotcom %} wil
|
|||
|
||||
## Creating a global webhook for a {% data variables.product.prodname_enterprise %}
|
||||
|
||||
Enterprise owners can create a global webhook to subscribe to events that occur within their enterprise. For more information, see "[AUTOTITLE](/admin/monitoring-activity-in-your-enterprise/exploring-user-activity-in-your-enterprise/managing-global-webhooks)."
|
||||
Enterprise owners can create a global webhook to subscribe to events that occur within their enterprise.
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.hooks-tab %}
|
||||
{% data reusables.webhooks.add_webhook_button %}
|
||||
1. In the "Payload URL" field, type the URL where you'd like to receive payloads.
|
||||
{% data reusables.webhooks.content_type_and_secret %}
|
||||
1. Optionally, if your payload URL is HTTPS and you would not like {% data variables.product.prodname_ghe_server %} to verify SSL certificates when delivering payloads, under "SSL verification", select **Disable**. Read the information about SSL verification, then click **Disable, I understand my webhooks may not be secure**.
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning:** SSL verification helps ensure that hook payloads are delivered securely. We do not recommend disabling SSL verification.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
1. Under "Which events would you like to trigger this webhook?", select the types of webhooks you'd like to receive. You should only subscribe to the webhook events that you need.
|
||||
1. If you chose **Let me select individual events**, select the events that will trigger the webhook.
|
||||
1. To make the webhook active immediately after adding the configuration, select **Active**.
|
||||
{% data reusables.webhooks.add_webhook_button %}
|
||||
|
||||
{% data reusables.enterprise_user_management.manage-global-webhooks-api %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
@ -92,13 +113,45 @@ After you create a new webhook, {% data variables.product.prodname_dotcom %} wil
|
|||
|
||||
## Creating a {% data variables.product.prodname_sponsors %} webhook
|
||||
|
||||
You can create a webhook to subscribe to events relating to {% data variables.product.prodname_sponsors %}. Only the owner of the sponsored account can create sponsorship webhooks for that account. For more information, see "[AUTOTITLE](/sponsors/integrating-with-github-sponsors/configuring-webhooks-for-events-in-your-sponsored-account)."
|
||||
You can create a webhook to subscribe to events relating to your sponsorships. Only the owner of the sponsored account can create sponsorship webhooks for that account. For more information about the event that a sponsorship webhook is subscribed to, see the [`sponsorship` webhook event](/webhooks-and-events/webhooks/webhook-events-and-payloads#sponsorship).
|
||||
|
||||
1. In the upper-right corner of any page, click your profile photo, then click **Your sponsors**.
|
||||
1. Next to the account you want to create a webhook for, click **Dashboard**.
|
||||
1. In the left sidebar, click **Webhooks**.
|
||||
{% data reusables.webhooks.add_webhook_button %}
|
||||
1. Under "Payload URL", type the URL where you'd like to receive payloads.
|
||||
{% data reusables.webhooks.content_type_and_secret %}
|
||||
1. To make the webhook active immediately after adding the configuration, select **Active**.
|
||||
1. Click **Create webhook**.
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Creating webhooks for a {% data variables.product.prodname_github_app %}
|
||||
|
||||
You can subscribe your {% data variables.product.prodname_github_app %} to webhook events to receive notifications whenever certain events occur. For more information, see "[AUTOTITLE](/apps/creating-github-apps/registering-a-github-app/registering-a-github-app)" and "[AUTOTITLE](/apps/creating-github-apps/registering-a-github-app/using-webhooks-with-github-apps)."
|
||||
The owner of a {% data variables.product.prodname_github_app %} can subscribe the app to webhook events to receive notifications whenever certain events occur. If an organization has designated any app managers for a {% data variables.product.prodname_github_app %} owned by the organization, the app managers can also subscribe the app to webhook events. For more information, see "[AUTOTITLE](/apps/creating-github-apps/creating-github-apps/using-webhooks-with-github-apps)."
|
||||
|
||||
Each {% data variables.product.prodname_github_app %} has one webhook. You can configure the webhook when you register a {% data variables.product.prodname_github_app %}, or you can edit the webhook configuration for an existing {% data variables.product.prodname_github_app %} registration.
|
||||
|
||||
For more information about configuring a webhook when you register a {% data variables.product.prodname_github_app %}, see "[AUTOTITLE](/apps/creating-github-apps/registering-a-github-app/registering-a-github-app)."
|
||||
|
||||
To configure a webhook for an existing {% data variables.product.prodname_github_app %} registration:
|
||||
|
||||
{% data reusables.apps.settings-step %}
|
||||
{% data reusables.user-settings.developer_settings %}
|
||||
{% data reusables.user-settings.github_apps %}
|
||||
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. Click **Save changes**.
|
||||
1. In the sidebar, click **Permissions & events**.
|
||||
1. {% data reusables.apps.webhooks-and-apps %}
|
||||
|
||||
Under the sections "Repository permissions," "Organization permissions," and "Account permissions," select the permissions that are required for the events your app will subscribe to. For more information, see "[AUTOTITLE](/apps/creating-github-apps/creating-github-apps/choosing-permissions-for-a-github-app)." For more information about things to consider when changing the permissions, see "[Modifying a {% data variables.product.prodname_github_app %} registration](/apps/maintaining-github-apps/modifying-a-github-app-registration#changing-the-permissions-of-a-github-app)."
|
||||
1. Under "Subscribe to Events," select the webhook events you would like your {% data variables.product.prodname_github_app %} to receive.
|
||||
1. Click **Save changes**.
|
||||
|
||||
You can also use the REST API to create a webhook for a {% data variables.product.prodname_github_app %}. For more information, see "[AUTOTITLE](/rest/apps/webhooks)."
|
||||
|
||||
## Further reading
|
||||
|
||||
|
|
|
@ -49,7 +49,14 @@ You can use the {% data variables.product.prodname_dotcom %} web interface or th
|
|||
|
||||
## Disabling a global webhook for a {% data variables.product.prodname_enterprise %}
|
||||
|
||||
Enterprise owners can disable a global webhook in an {% data variables.product.prodname_enterprise %}. For more information, see "[AUTOTITLE](/admin/monitoring-activity-in-your-enterprise/exploring-user-activity-in-your-enterprise/managing-global-webhooks)."
|
||||
Enterprise owners can disable a global webhook in an {% data variables.product.prodname_enterprise %}.
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.hooks-tab %}
|
||||
{% data reusables.webhooks.disable_webhook %}
|
||||
|
||||
{% data reusables.enterprise_user_management.manage-global-webhooks-api %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
@ -67,10 +74,22 @@ You can deactivate a webhook that was previously enabled for events relating to
|
|||
|
||||
## Disabling a {% data variables.product.prodname_sponsors %} webhook
|
||||
|
||||
You can disable webhooks that were previously enabled for events relating to {% data variables.product.prodname_sponsors %}. Only the owner of the sponsored account can disable sponsorship webhooks for that account. For more information, see "[AUTOTITLE](/sponsors/integrating-with-github-sponsors/configuring-webhooks-for-events-in-your-sponsored-account)."
|
||||
You can disable webhooks that were previously enabled for events relating to {% data variables.product.prodname_sponsors %}. Only the owner of the sponsored account can disable sponsorship webhooks for that account.
|
||||
|
||||
1. In the upper-right corner of any page, click your profile photo, then click **Your sponsors**.
|
||||
1. Next to the account you want to edit a webhook for, click **Dashboard**.
|
||||
1. In the left sidebar, click **Webhooks**.
|
||||
{% data reusables.webhooks.disable_webhook %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Disabling webhooks for a {% data variables.product.prodname_github_app %}
|
||||
|
||||
You can disable webhook deliveries to your {% data variables.product.prodname_github_app %}, or change the events it subscribes to. For more information, see "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app-registration#activating-or-deactivating-the-github-app-webhook)."
|
||||
Each {% data variables.product.prodname_github_app %} has one webhook. You cannot delete the webhook, but you can deactivate the webhook. The owner of a {% data variables.product.prodname_github_app %} can deactivate the webhook the app. If an organization has designated any app managers for a {% data variables.product.prodname_github_app %} owned by the organization, the app managers can also deactivate the webhook for the app.
|
||||
|
||||
{% data reusables.apps.settings-step %}
|
||||
{% data reusables.user-settings.developer_settings %}
|
||||
{% data reusables.user-settings.github_apps %}
|
||||
1. Next to the {% data variables.product.prodname_github_app %} that you want to deactivate the webhook for, click **Edit**.
|
||||
1. Under "Webhook," deselect **Active** to disable the webhook.
|
||||
1. Click **Save changes**.
|
||||
|
|
|
@ -44,7 +44,16 @@ You can use the {% data variables.product.prodname_dotcom %} web interface or th
|
|||
|
||||
## Editing a global webhook for a {% data variables.product.prodname_enterprise %}
|
||||
|
||||
Enterprise owners can edit a global webhook to change any of the settings that were selected when the webhook was initially created. For more information, see "[AUTOTITLE](/admin/monitoring-activity-in-your-enterprise/exploring-user-activity-in-your-enterprise/managing-global-webhooks#editing-a-global-webhook)."
|
||||
Enterprise owners can edit a global webhook to change any of the settings that were selected when the webhook was initially created.
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.hooks-tab %}
|
||||
{% data reusables.webhooks.edit_webhook %}
|
||||
{% data reusables.webhooks.edit_webhook_make_changes %}
|
||||
{% data reusables.webhooks.update_webhook %}
|
||||
|
||||
{% data reusables.enterprise_user_management.manage-global-webhooks-api %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
@ -62,10 +71,36 @@ You can edit a webhook that was created for an app that you published in {% data
|
|||
|
||||
## Editing a {% data variables.product.prodname_sponsors %} webhook
|
||||
|
||||
You can edit a webhook that was created for a {% data variables.product.prodname_sponsors %} account. Only the owner of the sponsored account can edit sponsorship webhooks for that account. For more information, see "[AUTOTITLE](/sponsors/integrating-with-github-sponsors/configuring-webhooks-for-events-in-your-sponsored-account)."
|
||||
You can edit a webhook that was created for a {% data variables.product.prodname_sponsors %} account. Only the owner of the sponsored account can edit sponsorship webhooks for that account.
|
||||
|
||||
1. In the upper-right corner of any page, click your profile photo, then click **Your sponsors**.
|
||||
1. Next to the account you want to edit a webhook for, click **Dashboard**.
|
||||
1. In the left sidebar, click **Webhooks**.
|
||||
{% data reusables.webhooks.edit_webhook %}
|
||||
{% data reusables.webhooks.edit_webhook_make_changes %}
|
||||
{% data reusables.webhooks.update_webhook %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Editing webhooks for a {% data variables.product.prodname_github_app %}
|
||||
|
||||
You can activate or deactivate a {% data variables.product.prodname_github_app %} webhook, change the webhook events that a {% data variables.product.prodname_github_app %} subscribes to, or make changes to other basic settings of a {% data variables.product.prodname_github_app %}'s webhook. For more information, see "[AUTOTITLE](/apps/maintaining-github-apps/modifying-a-github-app-registration)."
|
||||
Each {% data variables.product.prodname_github_app %} has one webhook. You cannot delete the webhook, but you can activate or deactivate the webhook, change the webhook events that the webhook subscribes to, or make changes to other basic settings for the webhook.
|
||||
|
||||
The owner of a {% data variables.product.prodname_github_app %} can edit the webhook configuration for the app. If an organization has designated any app managers for a {% data variables.product.prodname_github_app %} owned by the organization, the app managers can also edit the webhook configuration. For more information, see "[AUTOTITLE](/apps/creating-github-apps/creating-github-apps/using-webhooks-with-github-apps)."
|
||||
|
||||
{% data reusables.apps.settings-step %}
|
||||
{% data reusables.user-settings.developer_settings %}
|
||||
{% data reusables.user-settings.github_apps %}
|
||||
1. Next to the {% data variables.product.prodname_github_app %} that you want to update the webhook configuration for, click **Edit**.
|
||||
1. To edit the basic webhook settings:
|
||||
1. Under "Webhook", any desired changes to the webhook settings.
|
||||
1. Click **Save changes**.
|
||||
1. To make changes to the events that the webhook is subscribed to:
|
||||
1. In the sidebar, click **Permissions & events**.
|
||||
1. {% data reusables.apps.webhooks-and-apps %}
|
||||
|
||||
Under the sections "Repository permissions," "Organization permissions," and "Account permissions," select the permissions that are required for the events your app will subscribe to. For more information, see "[AUTOTITLE](/apps/creating-github-apps/creating-github-apps/choosing-permissions-for-a-github-app)." For more information about things to consider when changing the permissions, see "[Modifying a {% data variables.product.prodname_github_app %} registration](/apps/maintaining-github-apps/modifying-a-github-app-registration#changing-the-permissions-of-a-github-app)."
|
||||
1. Under "Subscribe to Events," select the webhook events you would like your {% data variables.product.prodname_github_app %} to receive.
|
||||
1. Click **Save changes**.
|
||||
|
||||
You can use the REST API to edit the webhook configuration for a {% data variables.product.prodname_github_app %}. For more information about using the REST API to view recent deliveries, see "[AUTOTITLE](/rest/apps/webhooks)."
|
||||
|
|
Загрузка…
Ссылка в новой задаче