Summary
Add PagerDuty as a supported DevOps tool in the CLI. PagerDuty is the leading incident management platform, critical for DORA MTTR (Mean Time To Restore) metrics.
Upstream Plugin
pagerduty in incubator-devlake/backend/plugins/pagerduty/
| Property |
Value |
| Plugin slug |
pagerduty |
| Auth |
AccessToken (custom header: Authorization: Token token=<token>) |
| Scope type |
Services (Id string) |
| Scope ID field |
id |
| Default endpoint |
https://api.pagerduty.com/ |
| Remote-scope API |
Yes |
| Connection test |
Yes |
Dependencies
Blocked by:
Not blocked by #85 — PagerDuty uses AccessToken, compatible with current auth model. The custom header format (Token token=) is handled by the DevLake backend, not the CLI.
Changes
- Add
ConnectionDef for pagerduty in connectionRegistry:
Endpoint: "https://api.pagerduty.com/"
SupportsTest: true
TokenPrompt: "PagerDuty API key"
EnvVarNames: []string{"PAGERDUTY_TOKEN", "PAGERDUTY_API_KEY"}
EnvFileKeys: []string{"PAGERDUTY_TOKEN", "PAGERDUTY_API_KEY"}
ScopeIDField: "id"
ScopeFunc: scopePagerDutyHandler
- Implement
scopePagerDutyHandler:
- Use
client.ListRemoteScopes("pagerduty", connID, "", "") to list services
- Let user select services interactively
- PUT selected services as scopes
- Set
Available: true
Acceptance Criteria
Summary
Add PagerDuty as a supported DevOps tool in the CLI. PagerDuty is the leading incident management platform, critical for DORA MTTR (Mean Time To Restore) metrics.
Upstream Plugin
pagerdutyinincubator-devlake/backend/plugins/pagerduty/pagerdutyAuthorization: Token token=<token>)Idstring)idhttps://api.pagerduty.com/Dependencies
Blocked by:
ScopeIDField)Not blocked by #85 — PagerDuty uses AccessToken, compatible with current auth model. The custom header format (
Token token=) is handled by the DevLake backend, not the CLI.Changes
ConnectionDefforpagerdutyinconnectionRegistry:Endpoint: "https://api.pagerduty.com/"SupportsTest: trueTokenPrompt: "PagerDuty API key"EnvVarNames: []string{"PAGERDUTY_TOKEN", "PAGERDUTY_API_KEY"}EnvFileKeys: []string{"PAGERDUTY_TOKEN", "PAGERDUTY_API_KEY"}ScopeIDField: "id"ScopeFunc: scopePagerDutyHandlerscopePagerDutyHandler:client.ListRemoteScopes("pagerduty", connID, "", "")to list servicesAvailable: trueAcceptance Criteria
gh devlake configure connection add --plugin pagerdutycreates a PagerDuty connectiongo build ./...,go test ./...,go vet ./...pass