PagerDuty Plugin
The PagerDuty plugin lets Slack users ask Junior who is on call, who rotates in or out next, and what is open in PagerDuty. Junior calls the PagerDuty REST API from the sandbox.
The plugin is read-only. It uses one deployment-level API key, and the bundled skill uses only GET requests.
Install
Section titled “Install”Install the plugin package alongside @sentry/junior:
pnpm add @sentry/junior @sentry/junior-pagerdutyRuntime setup
Section titled “Runtime setup”Add the package name to the plugin set exported from plugins.ts:
import { defineJuniorPlugins } from "@sentry/junior";
export const plugins = defineJuniorPlugins(["@sentry/junior-pagerduty"]);Config
Section titled “Config”Set deployment variables in the Junior environment, then redeploy.
Environment variables
Section titled “Environment variables”PAGERDUTY_API_KEY
PagerDuty REST API key for read-only requests.
- Define: Set
PAGERDUTY_API_KEYin the deployment environment - Required: Yes
- Environment override:
PAGERDUTY_API_KEY
Use an account-level General Access REST API key with Read-only API Key enabled. An admin or account owner creates it in Integrations > Developer Tools > API Access Keys.
Auth model
Section titled “Auth model”- The plugin uses one deployment-level PagerDuty API key, not per-user OAuth.
- Junior keeps the real
PAGERDUTY_API_KEYvalue on the host. - Sandbox requests to
api.pagerduty.comreceive a host-managedAuthorization: Token token=<key>header. - The sandbox never receives the key in env, files, or command arguments.
- Users do not connect or disconnect individual PagerDuty accounts from Junior App Home for this plugin.
What users can do
Section titled “What users can do”- Ask who is on call now for a schedule, escalation policy, or service.
- Ask who rotates in or out next and when the handoff happens.
- Inspect schedule members, escalation paths, and team members.
- List open incidents and read incident details, timelines, and notes.
Verify
Section titled “Verify”- Set
PAGERDUTY_API_KEYand redeploy. - Ask Junior in a channel:
Who is on call for <schedule name> right now, and who is next? - Confirm the reply names the current and next responders, the handoff time, and a PagerDuty link.
Failure modes
Section titled “Failure modes”PAGERDUTY_API_KEYmissing: Junior cannot add the credential. Set the env var and redeploy.401 Unauthorized: the key is invalid or revoked.403 Forbidden: the key cannot read the requested resource.429 Too Many Requests: PagerDuty is throttling. Retry later or narrow the request.- EU-region account: the manifest covers only
api.pagerduty.com. EU accounts need a manifest change forapi.eu.pagerduty.com. - Mutation requests (acknowledge, resolve, override): the plugin is read-only, and the skill declines these.
Next step
Section titled “Next step”Review Credentials & OAuth and Security Hardening.