Conversation
Added a setting to enable/ disable the text in the delete-logs button.
📝 WalkthroughWalkthroughThe changes add configuration and settings management to the McLogCleaner plugin. A new configuration file manages text display through environment variables. The plugin now implements a settings interface with a toggle form for managing the feature. The updater infrastructure is configured to support automatic plugin updates. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@mclogcleaner/plugin.json`:
- Around line 5-9: The plugin's update_url currently points to a personal repo;
change the "update_url" key in the plugin.json to null to match the repository
pattern (i.e., set "update_url": null) and ensure the JSON remains valid (remove
any trailing comma after the last property if present); the field to edit is
"update_url" in the plugin.json containing the existing
"https://raw.githubusercontent.com/JuggleGaming/mclogcleaner/..." value.
🧹 Nitpick comments (1)
mclogcleaner/config/mclogcleaner.php (1)
3-4: Redundant prefix in config key name.Since this config file is
mclogcleaner.php, the key is accessed asconfig('mclogcleaner.mclogcleaner_text_enabled'). Consider simplifying totext_enabledso it reads asconfig('mclogcleaner.text_enabled').♻️ Suggested simplification
return [ - 'mclogcleaner_text_enabled' => filter_var(env('MCLOGCLEANER_TEXT_ENABLED', true), FILTER_VALIDATE_BOOL), + 'text_enabled' => filter_var(env('MCLOGCLEANER_TEXT_ENABLED', true), FILTER_VALIDATE_BOOL), ];This would require updating references in
McLogCleanerPlugin.phpandMcLogCleanAction.phpaccordingly.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
mclogcleaner/config/mclogcleaner.phpmclogcleaner/plugin.jsonmclogcleaner/src/Filament/Components/Actions/McLogCleanAction.phpmclogcleaner/src/McLogCleanerPlugin.phpmclogcleaner/updater.json
🔇 Additional comments (5)
mclogcleaner/updater.json (1)
1-6: LGTM — updater manifest looks correct.The structure with a wildcard
"*"entry, version, and download URL follows the expected pattern for plugin update manifests.mclogcleaner/src/McLogCleanerPlugin.php (2)
31-38: LGTM — settings form is well-structured.The Toggle with a dynamic default from config correctly pre-populates the form with the current setting value.
40-51: No actionable issue found. The config cache pattern applies uniformly across all plugins in the codebase, suggesting it's handled at the framework level or theEnvironmentWriterTraitimplementation.mclogcleaner/src/Filament/Components/Actions/McLogCleanAction.php (2)
70-140: Action logic is solid.The file listing, date-based filtering, deletion flow, and error handling look correct. The
extractLogDatemethod properly guards against unparseable filenames.
38-40: No action required; config is properly registered by the Pelican framework.The plugin config is automatically loaded by Pelican's plugin system when the plugin is installed. Plugin configs placed in
plugin-name/config/directories are auto-discovered and merged—no explicitmergeConfigFrom()call is needed. Additionally, the code includes fallback defaults: bothconfig('mclogcleaner.mclogcleaner_text_enabled', true)(line 39) and the environment variableenv('MCLOGCLEANER_TEXT_ENABLED', true)ensure the setting defaults totrueeven if config loading were interrupted.Likely an incorrect or invalid review comment.
| "version": "1.1.2", | ||
| "description": "Clean your Minecraft-logs with ease", | ||
| "category": "plugin", | ||
| "url": "https://github.com/pelican-dev/plugins/tree/main/mclogcleaner", | ||
| "update_url": null, | ||
| "update_url": "https://raw.githubusercontent.com/JuggleGaming/mclogcleaner/refs/heads/main/updater.json", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check all update_url entries across plugin.json files
fd plugin.json | xargs rg '"update_url"' -B1 -A1Repository: pelican-dev/plugins
Length of output: 5829
Update URL points to a personal repository, inconsistent with repository pattern.
All other plugins in pelican-dev/plugins have update_url set to null. This plugin alone points to JuggleGaming/mclogcleaner for updates, allowing changes to be deployed without going through the pelican-dev review process. Either align with the repository pattern by setting update_url to null, or confirm this exception is intentional.
🤖 Prompt for AI Agents
In `@mclogcleaner/plugin.json` around lines 5 - 9, The plugin's update_url
currently points to a personal repo; change the "update_url" key in the
plugin.json to null to match the repository pattern (i.e., set "update_url":
null) and ensure the JSON remains valid (remove any trailing comma after the
last property if present); the field to edit is "update_url" in the plugin.json
containing the existing
"https://raw.githubusercontent.com/JuggleGaming/mclogcleaner/..." value.
There was a problem hiding this comment.
I can change that. Because the download must lead to my personal repo as well for the download i set the update_url to my repo as well. @Boy132 do you want me to change this or could this stay as it is? Before you ask. The moment this PR gets merged i will update my repo to be identical with this McLogCleaner-Release and create a new release there.
There was a problem hiding this comment.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
There was a problem hiding this comment.
Otherwise i can remove the update-system for my plugin in this repo - but in my oppinion it should keep existing.
There was a problem hiding this comment.
If you have setup your own repo why upload the plugin here in the first place?
There was a problem hiding this comment.
Because people do search here too and it can be found better (at least until the hub goes online for everybody)
Release 1.1.2
Added the update-system to automatically check for new updates.
Added a setting to enable/ disable the text in the delete-logs button.
Summary by CodeRabbit
New Features
Chores