Skip to content

fix(notifications): more consistent levels for server patching notifications#8837

Open
matsest wants to merge 1 commit intocoollabsio:nextfrom
matsest:fix/notification-levels
Open

fix(notifications): more consistent levels for server patching notifications#8837
matsest wants to merge 1 commit intocoollabsio:nextfrom
matsest:fix/notification-levels

Conversation

@matsest
Copy link

@matsest matsest commented Mar 9, 2026

Changes

  • I have updated the levels and colors for server patch notifications to be more consistent:
    • Regular (non-critical) patches is not reported as an error notifications
    • Critical patches is reported as a warning
    • Errors is reported as errors
  • The goal is to give clearer visual cues regarding server patching to users who subscribe to these notifications. Today everything looks like an error / is hard to distinguish between regular notifs and error notifs.

Details:

  • The functions for Discord, Telegram, Pushover, Slack and Webhook has been updated to reflect regular/critical/error levels by following the existing patterns for these functions
  • The use of "sample" in "sample updates" has been dropped in the message body, as it prints the "...and more packages" regardless when there are more than N packages (N varies across the channels)
  • Webhook success property is true for regular patch notifications (was false which looked wrong)

Disclaimer: I am not a well traversed PHP developer and it's my first PR suggestion to this repo, so I'm very much open to feedback on these changes.

Issues

Category

  • Bug fix
  • Improvement
  • New feature
  • Adding new one click service
  • Fixing or updating existing one click service

Preview

N/A

AI Assistance

  • AI was NOT used to create this PR
  • AI was used (please describe below)

If AI was used:

  • Tools used: OpenCode / Kimi k2.5
  • How extensively: Used to create initial suggestion based on my issue text and to generate test cases. Both the initial code and test cases have been manually edited and reviewed by me in the old-fashioned way..

Testing

Tests have been run by setting up my local dev environment and running:

docker exec -it coolify php artisan test tests/Feature/ServerPatchCheckNotificationTest.php

   PASS  Tests\Feature\ServerPatchCheckNotificationTest
  ✓ it generates url using base_url instead of APP_URL                                                    0.30s
  ✓ it falls back to public_ipv4 with port when fqdn is not set                                           0.03s
  ✓ it includes server url in all notification channels                                                   0.02s
  ✓ it uses correct url in error notifications                                                            0.03s
  ✓ it uses correct level for patch notifications in Discord                                              0.02s
  ✓ it uses correct level for patch notifications in Slack                                                0.02s
  ✓ it uses correct level for patch notifications in Pushover                                             0.02s
  ✓ it uses correct icon for patch notifications in Telegram                                              0.02s
  ✓ it returns success true for regular patches and false for errors in webhook                           0.02s
  ✓ it uses error level for actual errors in all channels                                                 0.03s

  Tests:    10 passed (31 assertions)
  Duration: 0.60s

Contributor Agreement

Important

  • I have read and understood the contributor guidelines. If I have failed to follow any guideline, I understand that this PR may be closed without review.
  • I have searched existing issues and pull requests (including closed ones) to ensure this isn't a duplicate.
  • I have tested all the changes thoroughly with a local development instance of Coolify and I am confident that they will work as expected when a maintainer tests them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant