Skip to main content

Adding a GitHub webhook

Abstract

You can specify webhooks on Github so that Bitrise automatically triggers a build of your app whenever you perform a specified action, such as a code push or a pull request.

GitHub App integration

If you connect your GitHub account or organization to Bitrise via the GitHub App integration, you don't need a webhook for any purpose.

You can specify webhooks so that Bitrise automatically triggers a build of your app whenever you perform a specified action, such as a code push or a pull request. For GitHub, all you have to do is register your bitrise-webhooks URL as a Webhook in your GitHub repository.

In addition, you can take advantage of Git Insights. Git Insights enables you to quantify and optimize Git collaboration. It provides crucial metrics like pull request cycle time and merge frequency.

You can register a webhook either automatically or manually. This guide walks you through the process of manually registering a webhook.

  1. Open your project on Bitrise with a user that has the Admin role on the project.

  2. On the main page of the project, click on the Project settings button.

    project-settings-button.png
  3. On the left, select Integrations and then the Webhooks tab.

  4. Find the Incoming webhooks section and open Manual webhooks.

  5. In the pop-up window, select GitHub from the dropdown menu.

    apps-webhooks-select.png
  6. Copy the webhook URL.

  7. Navigate to your GitHub repository and select Settings.

    Adding a GitHub webhook
  8. Select Add webhook under Webhooks.

    Adding a GitHub webhook
  9. Paste the GitHub Webhook URL from Bitrise to the Payload URL.

    Adding a GitHub webhook
  10. And on the same page, select Let me select individual events.

    Adding a GitHub webhook
  11. Select Pull request, Push, and Pull request review comments.

  12. Press the Add webhook button and you're done.