GitHub + PagerDuty
Connect GitHub and PagerDuty to Keep Your Engineering Teams Incident-Ready
Automate incident response, link code changes to outages, and close the loop between deployments and on-call alerts.

Why integrate GitHub and PagerDuty?
GitHub and PagerDuty do two of the most important jobs in any engineering organization — one manages the code that powers your product, the other makes sure the right people get woken up when that product breaks. When they operate in silos, critical context disappears mid-incident and engineers burn precious minutes hunting down which commit or pull request caused the degradation. Connecting the two closes that gap between your development workflow and your incident response process.
Automate & integrate GitHub & PagerDuty
Use case
Automatically Create GitHub Issues from PagerDuty Incidents
When a PagerDuty incident is triggered or escalated beyond a set severity threshold, tray.ai can automatically open a corresponding GitHub issue in the relevant repository. The issue is pre-populated with incident details, severity level, impacted services, and a direct link back to the PagerDuty incident timeline. No incident falls through the cracks, and engineering teams get a native code-side record of every production problem.
Use case
Trigger PagerDuty Alerts on Failed GitHub Actions Workflows
CI/CD pipeline failures in GitHub Actions often signal a broken deployment that may already be hitting production. With tray.ai, you can watch for failed workflow runs on critical branches and immediately fire a PagerDuty alert to the appropriate on-call rotation. Alerts include the workflow name, triggering commit, author, and a direct link to the failed run logs so responders have full context from the first notification.
Use case
Enrich PagerDuty Incidents with Recent GitHub Deployment Context
When a PagerDuty incident opens, tray.ai can query GitHub's deployments and releases API to automatically attach a list of recent commits, merged pull requests, and active deploys to the incident notes. Responders immediately see what changed in the last hour, day, or deployment window without switching tools or running manual git commands.
Use case
Auto-Assign PagerDuty Incidents Based on GitHub Code Ownership
Using GitHub's CODEOWNERS file or team membership data, tray.ai can route PagerDuty incidents to the team that owns the affected service or repository. When an alert fires for a specific microservice, the integration looks up the repository owner in GitHub and maps them to the correct PagerDuty escalation policy, so the right team gets paged every time.
Use case
Post-Mortem Automation: Create GitHub Issues After PagerDuty Incidents Resolve
After a PagerDuty incident resolves, tray.ai can automatically generate a structured post-mortem GitHub issue with incident duration, impacted services, responders involved, and a pre-filled blameless post-mortem template. The issue is assigned to the incident commander and added to the relevant team's project board so follow-up actions get captured and tracked inside the engineering workflow.
Use case
Sync PagerDuty On-Call Schedules with GitHub Team Notifications
Keep your GitHub repository notification settings in sync with PagerDuty's live on-call schedule. tray.ai can update GitHub team membership or @mention routing whenever the PagerDuty on-call rotation changes, so automated PR review requests, security alerts, and Dependabot notifications always reach the engineer currently on duty.
Use case
Escalate PagerDuty Incidents When GitHub PRs Are Blocked on Critical Hotfixes
During an active incident, a stalled code review can quietly extend downtime. tray.ai can monitor GitHub pull requests tagged with incident-related labels or linked to open PagerDuty incidents, and automatically escalate the PagerDuty incident severity or pull in additional responders if a hotfix PR sits unreviewed past a configurable time threshold.
Get started with GitHub & PagerDuty integration today
GitHub & PagerDuty Challenges
What challenges are there when working with GitHub & PagerDuty and how will using Tray.ai help?
Challenge
Mapping GitHub Repositories to PagerDuty Services
Most engineering organizations have dozens or hundreds of GitHub repositories, each potentially mapping to one or more PagerDuty services in non-obvious ways. Hardcoding these relationships is brittle, and mismatches cause alerts to reach the wrong team or get dropped entirely — especially as the service catalog grows and shifts.
How Tray.ai Can Help:
tray.ai lets you maintain a dynamic lookup table or pull service mapping data from a configuration file or external data store at runtime. When a GitHub event fires, the workflow queries the mapping to resolve the correct PagerDuty service ID. You can update that mapping centrally without touching the workflow logic itself.
Challenge
Handling High-Volume GitHub Webhook Events Without Alert Fatigue
Active repositories generate enormous volumes of GitHub events — pushes, PR updates, status checks — and naively forwarding every failure to PagerDuty would overwhelm on-call engineers with noise. Without intelligent filtering and deduplication, the integration itself becomes a source of alert fatigue.
How Tray.ai Can Help:
tray.ai's workflow logic supports multi-step conditional filtering, branch allowlists, severity thresholds, and time-based suppression windows. You can build precise rules — for example, only alerting on failures in the main or release/* branches during non-maintenance windows — and use PagerDuty's dedup key to prevent duplicate incidents for the same failing workflow.
Challenge
Authenticating Across Both APIs Securely
GitHub requires either a personal access token, GitHub App installation token, or OAuth credential, while PagerDuty uses API keys or OAuth 2.0. Managing, rotating, and scoping these credentials across a shared automation platform while maintaining least-privilege access is a real operational headache.
How Tray.ai Can Help:
tray.ai stores all credentials in an encrypted, centralized credential vault with role-based access controls. GitHub and PagerDuty connections are authenticated once using tray.ai's native connectors and reused across all workflows. Token rotation and re-authentication can be handled without modifying individual workflow logic.
Challenge
Keeping Integration Logic in Sync with Evolving Team Structures
On-call schedules, team ownership, escalation policies, and repository structures all change frequently as organizations grow. An integration built on static configuration will drift out of sync, causing misrouted pages or stale post-mortem assignments that erode trust in the automation.
How Tray.ai Can Help:
tray.ai workflows can fetch live configuration data at runtime — querying the PagerDuty Schedules API for the current on-call engineer or the GitHub Teams API for current membership — rather than relying on hardcoded values. This makes the integration self-updating and resilient to org changes without requiring workflow edits.
Challenge
Enriching Incidents Without Slowing Down Alert Delivery
Fetching recent commits, deployments, and PR data from GitHub to enrich a PagerDuty incident adds API calls and latency to the alert creation path. If enrichment queries are slow or fail, you risk delaying the core incident notification or losing the enrichment data entirely.
How Tray.ai Can Help:
tray.ai supports asynchronous workflow branching, so the primary PagerDuty incident creation step fires immediately while enrichment data is fetched in a parallel branch and appended to the incident notes in a follow-up update. Built-in error handling and retry logic ensure enrichment failures never block the critical alerting path.
Start using our pre-built GitHub & PagerDuty templates today
Start from scratch or use one of our pre-built GitHub & PagerDuty templates to quickly solve your most common use cases.
GitHub & PagerDuty Templates
Find pre-built GitHub & PagerDuty solutions for common use cases
Template
GitHub Actions Failure → PagerDuty Alert
Monitors GitHub Actions workflow runs on specified branches and automatically creates a PagerDuty incident when a workflow fails, including run details, commit information, and log links.
Steps:
- Trigger on GitHub Actions workflow_run event with a conclusion of 'failure'
- Extract workflow name, branch, triggering commit SHA, author, and run URL from the event payload
- Create a PagerDuty incident via the Events API v2 with full workflow context and severity mapped from the branch name
Connectors Used: GitHub, PagerDuty
Template
PagerDuty Incident Triggered → Create GitHub Issue with Context
When a new PagerDuty incident is created above a defined severity, automatically opens a GitHub issue in the mapped repository pre-filled with incident metadata and a link to the live PagerDuty timeline.
Steps:
- Trigger on PagerDuty incident.triggered or incident.escalated webhook event
- Query GitHub Deployments API to fetch the most recent deployment to the affected environment
- Create a GitHub issue with incident title, severity, service name, deployment SHA, and PagerDuty incident URL
Connectors Used: PagerDuty, GitHub
Template
PagerDuty Incident Resolved → Auto-Generate Post-Mortem GitHub Issue
After a PagerDuty incident resolves, generates a structured post-mortem GitHub issue populated with incident duration, timeline, responders, and a blameless template — then assigns it to the incident commander.
Steps:
- Trigger on PagerDuty incident.resolved webhook event
- Calculate incident duration, extract responder list, and fetch incident log entries from PagerDuty API
- Create a GitHub issue using a post-mortem template, assign to incident commander, and add to the team's GitHub Project board
Connectors Used: PagerDuty, GitHub
Template
New GitHub Release → PagerDuty Maintenance Window
Automatically opens a PagerDuty maintenance window whenever a new GitHub release or tag is published, suppressing non-critical alerts during planned deployment windows to reduce noise for on-call teams.
Steps:
- Trigger on GitHub release published event for specified repositories
- Parse release metadata to determine deployment window duration (default or from release body)
- Create a PagerDuty maintenance window for the mapped services, then close it automatically when the window expires or a follow-up event confirms deployment success
Connectors Used: GitHub, PagerDuty
Template
PagerDuty On-Call Rotation Change → Update GitHub Team Reviewers
Keeps GitHub pull request review assignments current by automatically updating a designated GitHub team's membership or CODEOWNERS entry whenever PagerDuty's on-call rotation shifts.
Steps:
- Trigger on a scheduled tray.ai poll of the PagerDuty Oncalls API to detect rotation changes
- Look up the incoming on-call engineer's GitHub username via a mapped user directory or custom field
- Update the GitHub team membership or a CODEOWNERS routing rule to reflect the new on-call assignee
Connectors Used: PagerDuty, GitHub
Template
GitHub Security Alert → PagerDuty High-Severity Incident
Monitors GitHub Dependabot and secret scanning alerts and fires a high-severity PagerDuty incident when a critical vulnerability or exposed secret is detected, routing to the security on-call rotation.
Steps:
- Trigger on GitHub repository_vulnerability_alert or secret_scanning_alert webhook event
- Evaluate alert severity (critical/high) and filter to only page on qualifying thresholds
- Create a PagerDuty incident routed to the security escalation policy with CVE details, affected package, and a direct link to the GitHub security advisory
Connectors Used: GitHub, PagerDuty