Skip to content

feat(core): implement configurable rollback action handler for Slack/Teams interactive buttons #125

@GerMoren

Description

@GerMoren

Pre-flight Checks

  • I have searched existing issues and this is not a duplicate
  • I understand this issue needs status:approved before a PR can be opened

Problem Description

The Slack and Teams notifiers already render an interactive Trigger Rollback button on incident messages. When clicked, the interaction reaches the webhook and generates a structured log entry — but no configurable action is executed. Teams that want to wire rollback to their own deployment pipeline (AWS CodeDeploy, GitHub Actions workflow dispatch, ArgoCD sync, custom script) have no hook to do so today.

Proposed Solution

Add a RollbackActionHandler port to @junando/core with a default no-op implementation. Teams register their own handler at startup via the existing config/DI pattern:

// Example: trigger a GitHub Actions workflow dispatch on rollback
junando.onRollback(async (incident) => {
  await triggerWorkflowDispatch({
    repo: incident.service,
    workflow: 'rollback.yml',
    ref: 'main',
  })
})

The webhook receives the Slack/Teams interaction payload, resolves the incident from the correlation ID, and calls the registered handler.

Existing behavior (structured log entry) becomes the default no-op so nothing breaks for teams that don't register a handler.

Affected Area

Other (new port in packages/core + webhook interaction handler)

Alternatives Considered

  • Hardcode a specific rollback mechanism (rejected: Junando is deployment-tool agnostic)
  • Document the log entry as the final behavior (rejected: loses the value of the interactive button entirely)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions