Skip to main content

Enterprise Server 3.15 está disponível no momento como versão release candidate.

Editando webhooks

Depois de criar um webhook, você pode fazer alterações nele.

About editing webhooks

You can edit a webhook to change any of the settings that were selected when the webhook was initially created. For more information about the settings you can select while creating a webhook, see "Creating webhooks."

Editing a repository webhook

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 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 "REST API endpoints for repository webhooks."

  1. On GitHub, navigate to the main page of the repository.

  2. Under your repository name, click Settings. If you cannot see the "Settings" tab, select the dropdown menu, then click Settings.

    Screenshot of a repository header showing the tabs. The "Settings" tab is highlighted by a dark orange outline.

  3. In the left sidebar, click Webhooks.

  4. Next to the webhook you'd like to edit, click Edit.

  5. Make any desired changes to the webhook settings.

  6. Click Update Webhook.

Editing an organization webhook

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 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 "REST API endpoints for organization webhooks."

  1. On GitHub, navigate to the main page of the repository.

  2. Under your repository name, click Settings. If you cannot see the "Settings" tab, select the dropdown menu, then click Settings.

    Screenshot of a repository header showing the tabs. The "Settings" tab is highlighted by a dark orange outline.

  3. In the left sidebar, click Webhooks.

  4. Next to the webhook you'd like to edit, click Edit.

  5. Make any desired changes to the webhook settings.

  6. Click Update Webhook.

Editing a global webhook for a GitHub Enterprise

Enterprise owners can edit a global webhook to change any of the settings that were selected when the webhook was initially created.

You can use the GitHub 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 "REST API endpoints for global webhooks."

  1. In the top-right corner of GitHub Enterprise Server, click your profile photo, then click Enterprise settings.

    Screenshot of the drop-down menu that appears when you click the profile photo on GitHub Enterprise Server. The "Enterprise settings" option is highlighted in a dark orange outline.

  2. On the left side of the page, in the enterprise account sidebar, click Settings.

  3. Under " Settings", click Hooks.

  4. Next to the webhook you'd like to edit, click Edit.

  5. Make any desired changes to the webhook settings.

  6. Click Update Webhook.

Editing webhooks for a GitHub App

Each 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 GitHub App can edit the webhook configuration for the app. If an organization has designated any app managers for a GitHub App owned by the organization, the app managers can also edit the webhook configuration. For more information, see "Using webhooks with GitHub Apps."

  1. In the upper-right corner of any page on GitHub, click your profile photo.
  2. Navigate to your account settings.
    • For an app owned by a personal account, click Settings.
    • For an app owned by an organization:
      1. Click Your organizations.
      2. To the right of the organization, click Settings.
  3. In the left sidebar, click Developer settings.
  4. In the left sidebar, click GitHub Apps.
  5. Next to the GitHub App that you want to update the webhook configuration for, click Edit.
  6. To edit the basic webhook settings:
    1. Under "Webhook", any desired changes to the webhook settings.
    2. Click Save changes.
  7. To make changes to the events that the webhook is subscribed to:
    1. In the sidebar, click Permissions & events.

    2. The specific webhook events that you can select for your GitHub App registration are determined by the type of permissions you selected for your app. You will first need to select the permissions you would like your app to have, and then you can subscribe your app to webhook events that are related to that set of permissions.

      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 "Choosing permissions for a GitHub App." For more information about things to consider when changing the permissions, see "Modifying a GitHub App registration."

    3. Under "Subscribe to Events," select the webhook events you would like your GitHub App to receive.

    4. Click Save changes.

You can use the REST API to edit the webhook configuration for a GitHub App. For more information about using the REST API to view recent deliveries, see "REST API endpoints for GitHub App webhooks."