GitHub Changes Integration Guide | PagerDuty

GitHub Changes + PagerDuty Benefits

  • Send notification-free events from GitHub or GitHub Enterprise to PagerDuty services regarding important changes, such as new pull requests and commits, to provide context for PagerDuty users.
  • Users may review change events within a PagerDuty service’s Recent Activity timeline during incident triage or hypercare. They can also see recent changes on the service’s incidents, and navigate across all changes in a comprehensive list of Recent Changes across all services.

Requirements

  • In PagerDuty: This integration requires a Manager base role or higher to configure.

  • In GitHub: This integration requires an Admin role to configure.

How it Works

  • When a GitHub pull request is closed and the branch is merged, a webhook will be sent to the endpoint of the integrated PagerDuty service.
  • These events will be viewable as change events in the service’s Recent Activity timeline on incidents associated with that service, and in a global list of all change events.

Integration Walkthrough

In PagerDuty

  1. In the PagerDuty web application, navigate to Services Service Directory and click the name of your preferred service.
  2. Select the Integrations tab and click Add an integration.
  3. Search and select GitHub, then click Add.
15901590

GitHub integration

  1. On the next screen, find GitHub in the list of integrations and click to reveal the integration details.
16851685

Integration details

  1. In the section Integration URL, click to copy the integration URL to your clipboard. It will be in the following format: https://events.pagerduty.com/integration/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/change/enqueue.
    • Keep the URL in a safe place, since you will use it in the next section.

📘

Branch Tracking

By default, the integration tracks the main/master branch. To edit this behavior, please refer to the section Branch Tracking

In GitHub

  1. Navigate to the GitHub repository where you would like to track changes, select the Settings tab, and then select Webhooks.
  2. Click Add webhook on the right.
  3. Paste the Integration URL that you generated in PagerDuty (above) into the Payload URL field, and in the Content type dropdown select application/x-www-form-urlencoded.
  4. Under Which events would you like to trigger this webhook? select Let me select individual events. Check the box next to Pull requests and uncheck the box next to Pushes.
  5. Ensure that the Active checkbox is selected, enter any other preferred settings, and click Add webhook.

📘

Push Events

This integration also supports push events, but they will show less information in PagerDuty. The pull request event is recommended if you use GitHub's pull request functionality. Since selecting both pull request and push events may result in two change events for a single action, we recommend selecting just one or the other.

Using the Integration

To test the integration, merge a pull request to the branch that you are tracking. You can temporarily change the branch you are tracking from master / main to another test branch using the instructions in the note above. In your PagerDuty account, navigate to the integrated service, click its title and you should see a change event labeled Recent Change in the Recent Activity timeline:

27502750

Recent Activity

Branch Tracking

By default, the integration tracks the main/master branch. If you would like to track a different branch, or track multiple branches:

  1. Navigate to the service with the GitHub integration select the Integrations tab click to the right of your GitHub integration.
16851685

Edit integration

  1. Click Edit Integration on the right and enter the name of your preferred branch in the branch field. To track multiple branches, add a space between each branch’s name, for example: feature-branch-1 feature-branch-2 feature-branch-3.
  2. Click Save changes.

GitHub Actions

The GitHub Changes integration supports creating change events with GitHub Actions. To use this feature, follow the Integration Walkthrough above to complete configuration, and use the Integration Key with the PagerDuty Change Events GitHub Action.

FAQ

Is it possible to modify change events using event rules?

Expand

Not at this time, but we are interested to learn about what you would like to accomplish, please contact our Support team with your use cases and feedback.

Is it possible to send change events from multiple GitHub branches?

Expand

Yes, you can add any number of integrations to a single service, including multiple GitHub integrations.

Are change events viewable in Slack or the PagerDuty mobile app?

Expand

Not at this time, but we would like to hear your feedback. Please contact our Support team.


Did this page help you?