feat(notify): add notification plugin system #204
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/ttheart!204
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/add-notification-plugins"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Add notification plugin system:
Notifierinterface for sending notification messages (#164)SlackWebhook— posts formatted messages to Slack incoming webhooks (#162)WebhookNotifier— sends JSON POST to any webhook URL (#162)ExternalPlugin— runs external binaries with JSON stdin (#163)deploy/plugins/(#164)Why
Enables alerting on webhook events via Slack, custom webhooks, or arbitrary external scripts. Extensible via the Notifier interface.
Testing
go test ./...and pre-commit passnotify_test.goBreaking Changes
None.
Notes
{"title":"...","body":"..."}Closes #165
Closes #162
Closes #163
Closes #164
Review
Clean notification plugin system. All 3 tests pass with race detector, lint and vet clean.
Interface:
Notifier.Send(Message)— clean, minimal contract.Implementations:
*title*\nbody), 10s HTTP timeoutMessageJSON to any URL, 10s timeoutTests: httptest server for Slack/Webhook, temp script for ExternalPlugin. All verify message delivery.
Example plugin:
deploy/plugins/example-notifier.sh— shell script showing stdin JSON parsing pattern.No blocking issues.
APPROVED