Repository navigation
v5 #210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
v5 #210
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
47f228c
Bumped version to 5.0.0-alpha.1
OakLoaf 6e8daa6
Corrected velocity tests package name
OakLoaf 73740a7
feat: ✨ Switch to Adventure ComponentLogger
Zoriot cf2bf21
Merge pull request #193 from Zoriot/ComponentLogger
OakLoaf c695b22
Merge remote-tracking branch 'origin/v5' into v5
OakLoaf a78c3da
Removed outdated test file
OakLoaf 0a8f554
Add schedule-frequency config option to allow for scheduling update c…
OakLoaf f400963
Bumped ViaVersion in dev environment
OakLoaf 1116952
Merge pull request #212 from OakLoaf/check-schedule
OakLoaf d21f7e3
Changed default Modrinth release channel to 'release'
OakLoaf 2814453
Changed BlueMap modrinth source loader to paper
OakLoaf 5a64581
Merge pull request #213 from OakLoaf/modrinth-channel
OakLoaf 26b3657
Merge remote-tracking branch 'origin/v5' into v5
OakLoaf 240b691
Add Discord webhook notifications for plugin downloads (#157)
Zoriot 1e008e9
Refactor Discord webhook implementation for improved lifecycle manage…
Zoriot 4b6a9ce
Merge pull request #196 from Zoriot/webhook
OakLoaf a07b634
Implemented Notifier to allow for future alternative notification types
OakLoaf bc75436
Removed outdated code
OakLoaf dd869d7
Merge pull request #217 from OakLoaf/notifier
OakLoaf e09270b
Ensured notifiers field cannot be null
OakLoaf c49151d
Merge branch 'main' into v5
OakLoaf a631b98
Fixed compilation error
OakLoaf bd8b759
Created new empty list instead of clearing
OakLoaf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 2 additions & 31 deletions
33
common/api/src/main/java/org/lushplugins/pluginupdater/api/util/UpdaterConstants.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,9 @@ | ||
| package org.lushplugins.pluginupdater.api.util; | ||
|
|
||
| import com.google.gson.Gson; | ||
|
|
||
| import java.util.logging.*; | ||
| import net.kyori.adventure.text.logger.slf4j.ComponentLogger; | ||
|
|
||
| public class UpdaterConstants { | ||
| public static final Logger LOGGER = Logger.getLogger("PluginUpdater"); | ||
| public static ComponentLogger LOGGER = ComponentLogger.logger("PluginUpdater"); | ||
| public static final Gson GSON = new Gson(); | ||
|
|
||
| static { | ||
| for (Handler handler : LOGGER.getHandlers()) { | ||
| LOGGER.removeHandler(handler); | ||
| } | ||
|
|
||
| LOGGER.addHandler(new StreamHandler(System.out, new LogFormatter())); | ||
| LOGGER.setUseParentHandlers(false); | ||
| } | ||
|
|
||
| private static class LogFormatter extends Formatter { | ||
| private static final String RESET = "\u001B[0m"; | ||
| private static final String YELLOW = "\u001B[33m"; | ||
| private static final String RED = "\u001B[31m"; | ||
|
|
||
| @Override | ||
| public String format(LogRecord record) { | ||
| String message = "[%s] [%s] %s".formatted(record.getLevel(), LOGGER.getName(), record.getMessage()); | ||
|
|
||
| if (record.getLevel() == Level.WARNING) { | ||
| message = YELLOW + message + RESET; | ||
| } else if (record.getLevel() == Level.SEVERE) { | ||
| message = RED + message + RESET; | ||
| } | ||
|
|
||
| return message + System.lineSeparator(); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...n/java/org/lushplugins/pluginupdater/common/config/deserializer/NotifierDeserializer.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| package org.lushplugins.pluginupdater.common.config.deserializer; | ||
|
|
||
| import com.electronwill.nightconfig.core.Config; | ||
| import org.jetbrains.annotations.Nullable; | ||
| import org.lushplugins.pluginupdater.common.UpdaterImpl; | ||
| import org.lushplugins.pluginupdater.common.notifier.DiscordWebHookNotifier; | ||
| import org.lushplugins.pluginupdater.common.notifier.Notifier; | ||
|
|
||
| public class NotifierDeserializer { | ||
|
|
||
| public static @Nullable Notifier discordWebHookNotifier(UpdaterImpl<?> updater, Config config) { | ||
| String webHookUrl = config.get("webhook-url"); | ||
| return !webHookUrl.isBlank() ? new DiscordWebHookNotifier(updater.updaterPlugin().getComponentLogger(), webHookUrl) : null; | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.