# GitHub + PagerDuty integration

> Automate incident response, link code changes to outages, and close the loop between deployments and on-call alerts.

**Canonical page:** https://tray.ai/connectors/github-pagerduty-integrations/
**GitHub connector:** https://tray.ai/connectors/github-integrations/
**GitHub documentation:** https://tray.ai/documentation/connectors/service/github

## Overview

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.

Every minute of downtime has a cost, and the fastest path to resolution almost always runs through your codebase. By connecting GitHub and PagerDuty on tray.ai, your teams can automatically surface recent deployments, open pull requests, or flagged commits the moment an incident fires — giving responders instant context without leaving their incident channel. Post-incident work gets faster too: PagerDuty resolutions can auto-create GitHub issues for post-mortems, tag the responsible repository, and trigger rollback workflows. The result is a faster incident lifecycle that cuts mean time to resolution (MTTR) and turns every outage into a concrete engineering improvement.

## Use cases

### 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.

- Eliminates manual ticket creation during high-stress incident response windows
- Creates a permanent, searchable audit trail of incidents linked to specific repositories
- Lets engineers attach code fixes and commits directly to the originating incident record

### 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.

- Catches deployment failures the moment they occur rather than waiting for user-reported errors
- Routes alerts to the correct on-call team based on repository or workflow name
- Cuts the time between a broken deploy and an engineer actively investigating the cause

### 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.

- Cuts the time engineers spend correlating incidents with recent code changes
- Surfaces the most likely culprit commits directly inside the PagerDuty incident view
- Gives all responders — including non-engineers — shared code context

### 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.

- Eliminates misrouted pages that delay incident response by minutes or hours
- Keeps on-call schedules aligned with actual code ownership without manual maintenance
- Reduces alert fatigue by ensuring engineers are only paged for services they own

### 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.

- Enforces a consistent post-mortem culture without adding manual overhead
- Links resolved incidents to actionable engineering work items in GitHub Projects
- Builds a historical record of incidents and resolutions that informs future architectural decisions

### 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.

- Ensures critical GitHub security and dependency alerts reach an active responder immediately
- Removes the manual work of updating review assignments at each rotation handoff
- Reduces notification noise by ensuring alerts go to the right person at the right time

### 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.

- Prevents hotfix bottlenecks from silently extending incident duration
- Keeps incident commanders informed when code review is the blocker to resolution
- Creates accountability and urgency without requiring manual status checks

## Templates

### 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.

Connectors used: GitHub, PagerDuty

### 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.

Connectors used: PagerDuty, GitHub

### 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.

Connectors used: PagerDuty, GitHub

### 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.

Connectors used: GitHub, PagerDuty

### 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.

Connectors used: PagerDuty, GitHub

### 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.

Connectors used: GitHub, PagerDuty

## Challenges Tray.ai solves

### 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 helps:** 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.

### 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 helps:** 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.

### 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 helps:** 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.

### 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 helps:** 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.

### 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 helps:** 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.

## Learn more

- Intelligent Integration: https://tray.ai/platform/intelligent-ipaas/
- Merlin Agent Builder: https://tray.ai/platform/merlin-agent-builder/
- Agent Gateway for MCP: https://tray.ai/platform/agent-gateway/
- Book a demo: https://tray.ai/contact/
