Skip to content

feat: add status notifier adapters#106

Merged
iKwesi merged 4 commits intomainfrom
feat/issue-47-notifier-adapters
Mar 16, 2026
Merged

feat: add status notifier adapters#106
iKwesi merged 4 commits intomainfrom
feat/issue-47-notifier-adapters

Conversation

@iKwesi
Copy link
Copy Markdown
Owner

@iKwesi iKwesi commented Mar 16, 2026

Summary

  • add provider-agnostic status notifier adapters with a concrete webhook notifier
  • emit pull request status events from runStatus with delivery failure isolation
  • wire the status CLI to optional --notify-webhook adapters and report notification outcomes

Closes #47

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a provider-agnostic status notification layer to SpecForge status reporting, including a webhook notifier adapter, and wires it through runStatus and the sf status CLI command with delivery failure isolation.

Changes:

  • Introduces StatusNotifier contracts plus a concrete webhook notifier and an emitStatusNotification helper.
  • Extends runStatus / formatStatusReport to emit and display notification delivery outcomes without failing the status flow.
  • Adds --notify-webhook (repeatable) to the status CLI and updates tests for notifier behavior/output.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/core/notifiers/statusNotifiers.ts New notifier interfaces + webhook implementation + delivery isolation helper.
src/core/diagnostics/status.ts Integrates notification emission into runStatus and prints delivery results in the report.
src/cli.ts Adds --notify-webhook option and maps URLs to webhook notifier adapters.
tests/notifications/status-notifiers.test.ts New unit tests for webhook delivery, failure isolation, and invalid URL handling.
tests/diagnostics/status.test.ts Updates runStatus tests to validate emitted events and delivery results (success/failure).
tests/cli/status-command.test.ts Updates CLI status command test to cover notifier wiring and output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a provider-agnostic notification layer for PR status events, including a concrete webhook notifier, and wires it into runStatus and the CLI so status events can be emitted without breaking the primary status flow on delivery failures.

Changes:

  • Introduces StatusNotifier adapter contract + emitStatusNotification() orchestration and a webhook-based notifier implementation.
  • Extends runStatus/formatStatusReport to emit and render notification delivery outcomes.
  • Adds --notify-webhook to the status CLI command and updates tests to cover notifier behavior and failure isolation.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/core/notifiers/statusNotifiers.ts New notifier contracts, webhook adapter, and delivery fan-out logic.
src/core/diagnostics/status.ts Integrates notifier emission into runStatus and prints delivery results in the report.
src/cli.ts Adds --notify-webhook option and maps CLI inputs into webhook notifier instances.
tests/notifications/status-notifiers.test.ts Verifies webhook payload/headers, URL validation, whitespace trimming, and failure isolation.
tests/diagnostics/status.test.ts Ensures runStatus emits notification events and remains successful on delivery failure.
tests/cli/status-command.test.ts Ensures CLI wires --notify-webhook into runStatus input and prints notification outcomes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a pluggable notification layer for PR status events, including a concrete webhook notifier, and wires notifications into the status diagnostics flow and CLI command.

Changes:

  • Introduces provider-agnostic status notifier contracts plus a webhook-based notifier implementation.
  • Emits pull_request_status events from runStatus with per-notifier failure isolation and result reporting.
  • Adds sf status --notify-webhook <url> to configure webhook notifications and prints delivery outcomes.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/core/notifiers/statusNotifiers.ts New notifier adapter contracts, webhook notifier, and event emission helper with isolated failures.
src/core/diagnostics/status.ts Emits status events during runStatus and prints notification deliveries in reports.
src/cli.ts Adds --notify-webhook option, creates webhook notifiers, and passes them into runStatus.
tests/notifications/status-notifiers.test.ts New unit tests covering webhook adapter behavior, validation, and concurrency ordering.
tests/diagnostics/status.test.ts Extends runStatus tests to assert notifier invocation and delivery reporting.
tests/cli/status-command.test.ts Updates CLI test to pass --notify-webhook and assert notifier wiring + output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a provider-agnostic status notification adapter layer and wires it into the status diagnostic/CLI so pull request status events can be emitted asynchronously (with per-adapter delivery isolation), including a concrete webhook notifier.

Changes:

  • Introduces StatusNotifier contracts + emitStatusNotification and a createWebhookStatusNotifier implementation.
  • Extends runStatus/formatStatusReport to emit and display notification delivery outcomes.
  • Adds sf status --notify-webhook <url> support (repeatable) and corresponding test coverage.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/notifications/status-notifiers.test.ts Adds unit tests for webhook notifier behavior, validation, and delivery isolation/concurrency.
tests/diagnostics/status.test.ts Verifies runStatus emits status events to notifiers and preserves success on delivery failures.
tests/cli/status-command.test.ts Ensures --notify-webhook is parsed and notifications appear in CLI output.
src/core/notifiers/statusNotifiers.ts Implements notifier types, webhook adapter, URL/id normalization, and concurrent delivery emission.
src/core/diagnostics/status.ts Integrates optional notifier emission into runStatus and renders notification results in reports.
src/cli.ts Adds --notify-webhook option and wires it to webhook notifier creation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@iKwesi iKwesi merged commit 35a4cf0 into main Mar 16, 2026
8 checks passed
@iKwesi iKwesi deleted the feat/issue-47-notifier-adapters branch March 16, 2026 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement notifier integrations for run and PR status events

2 participants