Skip to content

PagerDuty plugin support #91

@ewega

Description

@ewega

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

  • gh devlake configure connection add --plugin pagerduty creates a PagerDuty connection
  • PagerDuty appears in interactive plugin picker
  • PagerDuty scopes list services for selection
  • Connection test works
  • go build ./..., go test ./..., go vet ./... pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions