Skip to content

Add Pushover notification service#45

Open
gwhthompson wants to merge 1 commit intoahobsonsayers:mainfrom
gwhthompson:feat/pushover
Open

Add Pushover notification service#45
gwhthompson wants to merge 1 commit intoahobsonsayers:mainfrom
gwhthompson:feat/pushover

Conversation

@gwhthompson
Copy link
Copy Markdown

Summary

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

Details

  • Follows same patterns as Gotify, Ntfy, and Telegram implementations
  • Validation matches existing notification service validation style
  • Frontend support can be added in follow-up (same status as Gotify/Telegram)

Test plan

  • go test ./... passes
  • golangci-lint run . passes (0 issues)
  • gofumpt formatting applied

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
Copilot AI review requested due to automatic review settings December 28, 2025 15:41
Copy link
Copy Markdown

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

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.

Comment thread config.example.yaml
# 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)
Copy link

Copilot AI Dec 28, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
# 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)

Copilot uses AI. Check for mistakes.
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.

2 participants