Repository navigation
Add Discord webhook notifications for plugin downloads (#157) - #196
Conversation
|
@OakLoaf may you do a Review for this one? |
|
I'm afraid I'm a bit limited on time at the moment, but will try and make some time in the coming weeks to work on, review and merge for v5 |
OakLoaf
left a comment
There was a problem hiding this comment.
Thank you very much for this PR, the majority of this looks really good and ready to go, mainly just some nitpick changes.
I've been inspired by this PR to create a notifier system, so this PR will first be merged into the 'notifier' branch which will be later merged into 'v5' following those changes. The main changes from a user perspective will be the configuration but it should allow the ability to create notifications for other platforms in the future.
That doesn't change the direction or scope of this PR, so don't worry about implementing/changing anything other than the things mentioned in the review :)
Implement basic Discord webhook support to send notifications when plugins are successfully downloaded. Uses jdwebhooks 2.0.0 library with Discord's Components V2 API. Changes: - Add jdwebhooks 2.0.0 dependency to common/impl - Create DiscordWebhookNotifier class for sending webhook notifications - Add discord-webhook configuration section to config.yml (disabled by default) - Update ConfigManager to load and reload webhook settings - Integrate webhook notifications in UpdateHandler on successful downloads - Update UpdaterImpl to initialize and manage webhook notifier lifecycle Webhook notifications include: - Plugin name - Version change (old → new) - Update type (MAJOR, MINOR, PATCH, etc.) - Changelog link (if available) Users can enable by setting discord-webhook.enabled to true and providing a webhook-url in config.yml. Closes OakLoaf#157 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Thanks for the review. Sorry that it was that much issues - hope everything is resolved now (lost a few changed but i think i remade all) |
OakLoaf
left a comment
There was a problem hiding this comment.
Thank you for the quick changes to this, just a couple bits left to be resolved and then it's good to merge :)
…ment and config handling - Migrate `DiscordWebhookNotifier` to `DiscordWebHookNotifier` with improved error handling. - Update `ConfigManager` to streamline webhook configuration and initialization. - Replace the `isDiscordWebhookEnabled` flag with URL validation. - Revise `UpdateHandler` webhook invocation logic using `Optional`. - Improve lifecycle management by introducing `shutdown` for webhooks. - Adjust `UpdaterImpl` to handle webhook creation more robustly.
|
Tests are currently failing: Not sure why the pipeline doesn't fail - it should imo |
Not sure if I ever got round to adding the tests to GitHub actions, unsure though, might be worth opening a separate issue for that one |
|
Do the tests failing relate to this PR or is it an overarching problem? |
|
@OakLoaf overarching problem, not related to that pr. Will create a issue when a have time & don't forget |
Implement basic Discord webhook support to send notifications when plugins are successfully downloaded. Uses jdwebhooks 2.0.0 library with Discord's Components V2 API.
Changes:
Webhook notifications include:
Infos
Users can enable by setting discord-webhook.enabled to true and providing a webhook-url in config.yml.
Closes #157
AI Disclosure
GitHub Copilot was used for most of the implementation, all code was manually verified & tested on paper. Additional Changes was made to ensure it works correctly.