diff --git a/content/pull-requests/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits.md b/content/pull-requests/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits.md index fa8a1e01d3..2ee0013c01 100644 --- a/content/pull-requests/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits.md +++ b/content/pull-requests/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits.md @@ -37,6 +37,12 @@ To compare tags, you can select a tag name from the `compare` drop-down menu at Here's an example of a [comparison between two tags](https://github.com/octocat/linguist/compare/v2.2.0...octocat:v2.3.3). +{% note %} + +**Note:** If a branch and a tag have the same name, the branch will be used when comparing commits. You can compare the tag specifically by adding `tags/` to the tag name. + +{% endnote %} + ## Comparing commits You can also compare two arbitrary commits in your repository or its forks on {% data variables.product.prodname_dotcom %} in a two-dot diff comparison. diff --git a/content/rest/apps/webhooks.md b/content/rest/apps/webhooks.md index e4624f5314..cb30d174ad 100644 --- a/content/rest/apps/webhooks.md +++ b/content/rest/apps/webhooks.md @@ -17,6 +17,6 @@ autogenerated: rest ## About webhooks for {% data variables.product.prodname_github_apps %} -A {% data variables.product.prodname_github_app %}'s webhook allows you to receive HTTP `POST` payloads whenever certain events happen for an app. {% data reusables.webhooks.webhooks-rest-api-links %} +A {% data variables.product.prodname_github_app %}'s webhook allows your server to receive HTTP `POST` payloads whenever certain events happen for a {% data variables.product.prodname_github_app %}. For more information, see "[AUTOTITLE](/webhooks)" and "[AUTOTITLE](/apps/creating-github-apps/registering-a-github-app/using-webhooks-with-github-apps)." diff --git a/content/rest/orgs/webhooks.md b/content/rest/orgs/webhooks.md index 2cff260509..8cce9f405a 100644 --- a/content/rest/orgs/webhooks.md +++ b/content/rest/orgs/webhooks.md @@ -15,25 +15,15 @@ autogenerated: rest ## About organization webhooks -Organization webhooks allow you to receive HTTP `POST` payloads whenever certain events happen in an organization. For more information, see "[AUTOTITLE](/webhooks-and-events/webhooks/about-webhooks)." +Organization webhooks allow your server to receive HTTP `POST` payloads whenever certain events happen in an organization. For more information, see "[AUTOTITLE](/webhooks)." ### Scopes and restrictions -All actions against organization webhooks require the authenticated user to be an admin of the organization being managed. Additionally, OAuth tokens require the `admin:org_hook` scope. For more information, see "[AUTOTITLE](/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps)." +You must be an organization owner to use these endpoints. OAuth tokens require the `admin:org_hook` scope to use these endpoints. In order to protect sensitive data which may be present in webhook configurations, we also enforce the following access control rules: - {% data variables.product.prodname_oauth_apps %} cannot list, view, or edit webhooks which they did not create. - Users cannot list, view, or edit webhooks which were created by {% data variables.product.prodname_oauth_apps %}. -### Receiving Webhooks - -In order for {% data variables.product.product_name %} to send webhook payloads, your server needs to be accessible from the Internet. We also highly suggest using SSL so that we can send encrypted payloads over HTTPS. - -For more best practices, [see our guide](/rest/guides/best-practices-for-integrators). - -#### Webhook headers - -{% data variables.product.product_name %} will send along several HTTP headers to differentiate between event types and payload identifiers. See [webhook headers](/webhooks-and-events/webhooks/webhook-events-and-payloads#delivery-headers) for details. - diff --git a/content/rest/webhooks/index.md b/content/rest/webhooks/index.md index fe6d32af5f..4455357b24 100644 --- a/content/rest/webhooks/index.md +++ b/content/rest/webhooks/index.md @@ -18,4 +18,8 @@ redirect_from: autogenerated: rest --- +## About repository webhooks + +Repository webhooks allow your server to receive HTTP `POST` payloads whenever certain events happen in a repository. For more information, see "[AUTOTITLE](/webhooks)." + diff --git a/content/webhooks/testing-and-troubleshooting-webhooks/index.md b/content/webhooks/testing-and-troubleshooting-webhooks/index.md index 645594cf7c..e2394d5cef 100644 --- a/content/webhooks/testing-and-troubleshooting-webhooks/index.md +++ b/content/webhooks/testing-and-troubleshooting-webhooks/index.md @@ -13,6 +13,6 @@ children: - /redelivering-webhooks - /testing-webhooks - /troubleshooting-webhooks - - /receiving-webhooks-with-the-github-cli + - /using-the-github-cli-to-forward-webhooks-for-testing --- diff --git a/content/webhooks/testing-and-troubleshooting-webhooks/redelivering-webhooks.md b/content/webhooks/testing-and-troubleshooting-webhooks/redelivering-webhooks.md index 1e89f872d9..d0e07aad29 100644 --- a/content/webhooks/testing-and-troubleshooting-webhooks/redelivering-webhooks.md +++ b/content/webhooks/testing-and-troubleshooting-webhooks/redelivering-webhooks.md @@ -1,5 +1,6 @@ --- title: Redelivering webhooks +shortTitle: Redeliver webhooks intro: 'To help recover from failed deliveries, you can redeliver webhook deliveries from the past {% data variables.webhooks.retention %} days.' versions: fpt: '*' diff --git a/content/webhooks/testing-and-troubleshooting-webhooks/testing-webhooks.md b/content/webhooks/testing-and-troubleshooting-webhooks/testing-webhooks.md index 94644f47f3..b424904d23 100644 --- a/content/webhooks/testing-and-troubleshooting-webhooks/testing-webhooks.md +++ b/content/webhooks/testing-and-troubleshooting-webhooks/testing-webhooks.md @@ -1,5 +1,6 @@ --- title: Testing webhooks +shortTitle: Test webhooks intro: 'Learn how to test your webhooks and your code that handles webhook deliveries.' redirect_from: - /webhooks/testing diff --git a/content/webhooks/testing-and-troubleshooting-webhooks/troubleshooting-webhooks.md b/content/webhooks/testing-and-troubleshooting-webhooks/troubleshooting-webhooks.md index b28d57d74f..023a0879b7 100644 --- a/content/webhooks/testing-and-troubleshooting-webhooks/troubleshooting-webhooks.md +++ b/content/webhooks/testing-and-troubleshooting-webhooks/troubleshooting-webhooks.md @@ -1,5 +1,6 @@ --- title: Troubleshooting webhooks +shortTitle: Troubleshoot webhooks intro: 'Learn how to diagnose and resolve common errors for webhooks.' versions: fpt: '*' diff --git a/content/webhooks/testing-and-troubleshooting-webhooks/receiving-webhooks-with-the-github-cli.md b/content/webhooks/testing-and-troubleshooting-webhooks/using-the-github-cli-to-forward-webhooks-for-testing.md similarity index 94% rename from content/webhooks/testing-and-troubleshooting-webhooks/receiving-webhooks-with-the-github-cli.md rename to content/webhooks/testing-and-troubleshooting-webhooks/using-the-github-cli-to-forward-webhooks-for-testing.md index 6896ac1271..e61815157b 100644 --- a/content/webhooks/testing-and-troubleshooting-webhooks/receiving-webhooks-with-the-github-cli.md +++ b/content/webhooks/testing-and-troubleshooting-webhooks/using-the-github-cli-to-forward-webhooks-for-testing.md @@ -1,16 +1,17 @@ --- -title: Receiving webhooks with the GitHub CLI +title: Using the GitHub CLI to forward webhooks for testing intro: 'You can use the {% data variables.product.prodname_cli %} to test webhooks in your development environment without the complexity of port forwarding or third-party tools.' versions: feature: cli-webhook-forwarding topics: - Webhooks -shortTitle: Receiving webhooks with the GitHub CLI +shortTitle: Test with the CLI redirect_from: - /developers/webhooks-and-events/webhooks/receiving-webhooks-with-the-github-cli - /webhooks-and-events/webhooks/receiving-webhooks-with-the-github-cli - /webhooks/webhooks/receiving-webhooks-with-the-github-cli - /webhooks/receiving-webhooks-with-the-github-cli + - /webhooks/testing-and-troubleshooting-webhooks/receiving-webhooks-with-the-github-cli --- ## About receiving webhooks with {% data variables.product.prodname_cli %} diff --git a/content/webhooks/testing-and-troubleshooting-webhooks/viewing-webhook-deliveries.md b/content/webhooks/testing-and-troubleshooting-webhooks/viewing-webhook-deliveries.md index 89b375efe9..7cc86d78f2 100644 --- a/content/webhooks/testing-and-troubleshooting-webhooks/viewing-webhook-deliveries.md +++ b/content/webhooks/testing-and-troubleshooting-webhooks/viewing-webhook-deliveries.md @@ -1,5 +1,6 @@ --- title: Viewing webhook deliveries +shortTitle: View deliveries intro: 'You can view details about webhook deliveries from the past {% data variables.webhooks.retention %} days.' versions: fpt: '*' diff --git a/content/webhooks/using-webhooks/creating-webhooks.md b/content/webhooks/using-webhooks/creating-webhooks.md index 2b14628f41..b51b04ef9e 100644 --- a/content/webhooks/using-webhooks/creating-webhooks.md +++ b/content/webhooks/using-webhooks/creating-webhooks.md @@ -1,5 +1,6 @@ --- title: Creating webhooks +shortTitle: Create webhooks intro: 'You can create webhooks to subscribe to specific events that occur on {% data variables.product.prodname_dotcom %}.' redirect_from: - /webhooks/creating @@ -70,6 +71,12 @@ After you create a new webhook, {% data variables.product.prodname_dotcom %} wil Enterprise owners can create a global webhook to subscribe to events that occur within their enterprise. +{% ifversion ghes or ghae %} + +You can use the {% data variables.product.company_short %} web interface or the REST API to create a global webhook. For more information about using the REST API to create a global webhook, see "[AUTOTITLE](/rest/enterprise-admin/global-webhooks)." + +{% endif %} + {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.hooks-tab %} @@ -89,8 +96,6 @@ Enterprise owners can create a global webhook to subscribe to events that occur 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 %} {% ifversion fpt or ghec %} diff --git a/content/webhooks/using-webhooks/disabling-webhooks.md b/content/webhooks/using-webhooks/disabling-webhooks.md index ed3fc3dce0..a12ab0665d 100644 --- a/content/webhooks/using-webhooks/disabling-webhooks.md +++ b/content/webhooks/using-webhooks/disabling-webhooks.md @@ -1,5 +1,6 @@ --- title: Disabling webhooks +shortTitle: Disable webhooks intro: 'You can disable a webhook to unsubscribe from events that occur on {% data variables.product.prodname_dotcom %}.' versions: fpt: '*' @@ -51,13 +52,17 @@ You can use the {% data variables.product.prodname_dotcom %} web interface or th Enterprise owners can disable a global webhook in an {% data variables.product.prodname_enterprise %}. +{% ifversion ghes or ghae %} + +You can use the {% data variables.product.company_short %} web interface or the REST API to disable a global webhook. For more information about using the REST API to disable a global webhook, see "[AUTOTITLE](/rest/enterprise-admin/global-webhooks)." + +{% endif %} + {% 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 %} {% ifversion fpt or ghec %} diff --git a/content/webhooks/using-webhooks/editing-webhooks.md b/content/webhooks/using-webhooks/editing-webhooks.md index 9e3e6a348f..194700bd62 100644 --- a/content/webhooks/using-webhooks/editing-webhooks.md +++ b/content/webhooks/using-webhooks/editing-webhooks.md @@ -1,5 +1,6 @@ --- title: Editing webhooks +shortTitle: Edit webhooks intro: 'After creating a webhook, you can make changes to it.' versions: fpt: '*' @@ -46,6 +47,12 @@ You can use the {% data variables.product.prodname_dotcom %} web interface or th Enterprise owners can edit a global webhook to change any of the settings that were selected when the webhook was initially created. +{% ifversion ghes or ghae %} + +You can use the {% data variables.product.company_short %} web interface or the REST API to edit a global webhook. For more information about using the REST API to edit a global webhook, see "[AUTOTITLE](/rest/enterprise-admin/global-webhooks)." + +{% endif %} + {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.hooks-tab %} @@ -53,8 +60,6 @@ Enterprise owners can edit a global webhook to change any of the settings that w {% data reusables.webhooks.edit_webhook_make_changes %} {% data reusables.webhooks.update_webhook %} -{% data reusables.enterprise_user_management.manage-global-webhooks-api %} - {% endif %} {% ifversion fpt or ghec %} diff --git a/content/webhooks/using-webhooks/handling-failed-webhook-deliveries.md b/content/webhooks/using-webhooks/handling-failed-webhook-deliveries.md index b596ca3265..1b8c4fe803 100644 --- a/content/webhooks/using-webhooks/handling-failed-webhook-deliveries.md +++ b/content/webhooks/using-webhooks/handling-failed-webhook-deliveries.md @@ -1,6 +1,6 @@ --- title: Handling failed webhook deliveries -shortTitle: Handling failed deliveries +shortTitle: Handle failed deliveries intro: '{% data variables.product.company_short %} does not automatically redeliver failed webhook deliveries, but you can handle failed deliveries manually or by writing code.' versions: fpt: '*' @@ -216,7 +216,7 @@ async function fetchWebhookDeliveriesSince(lastWebhookRedeliveryTime) { ); const deliveries = []; - + for await (const { data } of iterator) { const oldestDeliveryTimestamp = new Date( data[data.length - 1].delivered_at diff --git a/content/webhooks/using-webhooks/handling-webhook-deliveries.md b/content/webhooks/using-webhooks/handling-webhook-deliveries.md index dcbd1c2800..20c912dd34 100644 --- a/content/webhooks/using-webhooks/handling-webhook-deliveries.md +++ b/content/webhooks/using-webhooks/handling-webhook-deliveries.md @@ -1,5 +1,6 @@ --- title: Handling webhook deliveries +shortTitle: Handle deliveries intro: 'Learn how to write code to listen for and respond to webhook deliveries.' redirect_from: - /webhooks/configuring @@ -203,7 +204,7 @@ npm install express Create a JavaScript file with the following contents. Modify the code to handle the event types that your webhook is subscribed to, as well as the `ping` event that {% data variables.product.company_short %} sends when you create a webhook. This example handles the `issues` and `ping` events. ```javascript copy annotate -// You installed the `express` library earlier. For more information, see "[JavaScript example: Install dependencies](#javascript-example-install-dependencies)." +// You installed the `express` library earlier. For more information, see "[JavaScript example: Install dependencies](#javascript-example-install-dependencies)." const express = require('express'); // This initializes a new Express application. diff --git a/content/webhooks/using-webhooks/validating-webhook-deliveries.md b/content/webhooks/using-webhooks/validating-webhook-deliveries.md index 1d6d3d3882..9209a8055e 100644 --- a/content/webhooks/using-webhooks/validating-webhook-deliveries.md +++ b/content/webhooks/using-webhooks/validating-webhook-deliveries.md @@ -1,5 +1,6 @@ --- title: Validating webhook deliveries +shortTitle: Validate deliveries intro: 'You can use a webhook secret to verify that a webhook delivery is from {% data variables.product.company_short %}.' redirect_from: - /webhooks/securing diff --git a/data/reusables/enterprise_user_management/manage-global-webhooks-api.md b/data/reusables/enterprise_user_management/manage-global-webhooks-api.md index ec012558e9..e7812fd30d 100644 --- a/data/reusables/enterprise_user_management/manage-global-webhooks-api.md +++ b/data/reusables/enterprise_user_management/manage-global-webhooks-api.md @@ -1,3 +1,3 @@ {% ifversion ghes or ghae %} -You can also use the {% data variables.product.prodname_enterprise_api %} to manage global webhooks. For a complete list of actions, see "[AUTOTITLE](/rest/enterprise-admin/global-webhooks)." +You can also use the REST API to manage global webhooks. For a complete list of endpoints, see "[AUTOTITLE](/rest/enterprise-admin/global-webhooks)." {% endif %}