feat(notifications): any number of webhooks, managed in settings (#87) #88
No reviewers
Labels
No labels
bug
docs
duplicate
enhancement
help wanted
invalid
nice-to-have
pre-1.0
question
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jfro/lamplighter!88
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/87-many-webhooks"
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 changed
PR #88 lets settings add, edit, test and remove any number of webhooks, each enabled one gets every notification with its own signature, and the WEBHOOK_* env vars are gone. The tests fail on main and pass here, CI is green, and I checked the UI at 390px and desktop in Chromium and WebKit.
Fixes #87
Red, then green
bash -lc 'source ~/.rmenv; eval "$(mise activate bash --shims)"; env -u FORGEJO_TOKEN MIX_TEST_PARTITION=_87 mix test test/lamplighter/notifications_test.exs test/lamplighter/notifications/env_test.exs test/lamplighter_web/live/notification_settings_live_test.exs'3dab5ee): exit 18cd5986): exit 0Checks
bash -lc 'source ~/.rmenv; eval "$(mise activate bash --shims)"; export MIX_TEST_PARTITION=_87; env -u FORGEJO_TOKEN mix format --check-formatted && env -u FORGEJO_TOKEN mix compile --warnings-as-errors && env -u FORGEJO_TOKEN MIX_ENV=test mix ecto.rollback --step 1 && env -u FORGEJO_TOKEN MIX_ENV=test mix ecto.migrate && env -u FORGEJO_TOKEN mix test', exit 0bash -lc 'source ~/.rmenv; eval "$(mise activate bash --shims)"; export MIX_TEST_PARTITION=_87; env -u FORGEJO_TOKEN mix test test/lamplighter/notifications_test.exs test/lamplighter/notifications/env_test.exs test/lamplighter_web/live/notification_settings_live_test.exs', exit 0Shipping it
Prover
Passed (Sonnet): I read the full diff, re-ran the 47 webhook, env and settings tests, and tried forged LiveView events. A non-numeric webhook id in edit-webhook or remove-webhook crashes that user's LiveView with Ecto.Query.CastError (low severity, remounts), and I didn't try real receivers or a released-database upgrade.
Every command above was run by Fortysix's Basecamp itself, on the branch named.
Screenshots (example data: three webhooks, one off with a failure)
390-list-chromium
desktop-list-chromium
390-edit-chromium
desktop-edit-chromium
390-list-webkit
desktop-edit-webkit