Add Pushover notification service#45
Conversation
Adds optional Pushover notification support following existing patterns. - PushoverConfig with token, user, device, sound, priority fields - Priority range -2 to 1 (lowest to high) - Client using gregdel/pushover library - Integration test (skipped by default) - Example configuration
There was a problem hiding this comment.
Pull request overview
This PR adds support for Pushover as a new notification service, following the established patterns from existing services (Gotify, Ntfy, Telegram). The implementation includes configuration schema, validation, client logic, integration tests, and example configuration.
- Implements PushoverConfig with required fields (token, user) and optional fields (device, sound, priority)
- Adds priority range validation restricting values to -2 (lowest) through 1 (high)
- Uses the gregdel/pushover v1.4.0 library for API integration
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| schema/models.openapi.yaml | Adds PushoverConfig schema definition with proper field ordering and documentation |
| config/config.gen.go | Generated config structures for Pushover including enum type registration |
| config/notification.go | Validation logic for required Pushover fields and priority range (-2 to 1) |
| notification/pushover.go | Client implementation following established interface patterns |
| notification/pushover_test.go | Integration test matching existing service test patterns |
| notification/notification.go | Integrates Pushover client into GetNotificationClients factory |
| go.mod, go.sum | Adds gregdel/pushover v1.4.0 dependency |
| config.example.yaml | Example configuration with field descriptions |
| server/server.gen.go | Auto-generated OpenAPI spec updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Optional settings: | ||
| # device: <your device name> # Target specific device | ||
| # sound: pushover # Notification sound (pushover, bike, bugle, cosmic, etc.) | ||
| # priority: 0 # Message priority (-2=lowest, -1=low, 0=normal, 1=high, 2=emergency) |
There was a problem hiding this comment.
The documented priority range includes "2=emergency" but the validation in config/notification.go only allows -2 to 1. Either update the validation to support priority 2 (which would also require adding retry and expire parameters per Pushover's API), or correct the documentation to match the current implementation by removing "2=emergency" from this comment.
| # priority: 0 # Message priority (-2=lowest, -1=low, 0=normal, 1=high, 2=emergency) | |
| # priority: 0 # Message priority (-2=lowest, -1=low, 0=normal, 1=high) |
Summary
Adds optional Pushover notification support following existing patterns.
Details
Test plan
go test ./...passesgolangci-lint run .passes (0 issues)gofumptformatting applied