github: teach the PocketBase bot every field - #16781
Merged
Merged
Conversation
The bot covered most of script_scripts but not categories, has_arm, execute_in or app_vars, so those had to be edited by hand in the admin UI. categories is a relation, so names are resolved against script_categories and ids are accepted too - a copy out of the PocketBase UI works either way. app_vars is a JSON column and rides the code-block 'set' path with its content parsed rather than stored verbatim, so readers get an object. cpu/ram/hdd/os/version live inside install_methods, and '/pocketbase immich hdd=25' is how people ask for them. They now route to the default (non-Alpine) method instead of being rejected as unknown fields, the reply names which method was touched, and the value syncs into ct/<slug>.sh like the 'method' path already does.
Two gaps were left. type is a relation to z_ref_script_types, so it needs the same name-to-id resolution as categories - people write "ct", not a fifteen-character id. Screenshots had no command at all. The screenshot subcommand hands the URLs to the frontend's /api/screenshots rather than fetching images inside a workflow. That endpoint already checks the content type and size and attaches the file to PocketBase; doing it a second time here would be a second set of bugs. It needs SCREENSHOT_IMPORT_SECRET, and says so plainly when it is missing instead of failing halfway. slug stays deliberately out of reach. It is the URL, the JSON filename and the ct/<slug>.sh path at once, so renaming it is a migration rather than an edit, and the help text now says that instead of leaving people to wonder.
asylumexp
approved these changes
Aug 26, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
✍️ Description
The bot covered most of script_scripts but not categories, has_arm, execute_in or app_vars, so those had to be edited by hand in the admin UI.
categories is a relation, so names are resolved against script_categories and ids are accepted too - a copy out of the PocketBase UI works either way. app_vars is a JSON column and rides the code-block 'set' path with its content parsed rather than stored verbatim, so readers get an object.
cpu/ram/hdd/os/version live inside install_methods, and '/pocketbase immich hdd=25' is how people ask for them. They now route to the default (non-Alpine) method instead of being rejected as unknown fields, the reply names which method was touched, and the value syncs into ct/.sh like the 'method' path already does.
🔗 Related Issue
Fixes #
✅ Prerequisites (X in brackets)
🤖 AI Assistance (X in brackets)
AGENTS.mdand.github/agents/pve-script-creator.agent.mdas guidance, and the output has been reviewed and corrected to match those guidelines.🛠️ Type of Change (X in brackets)
README,AppName.md,CONTRIBUTING.md, or other docs.💥 Breaking Change Advisory (only if you checked "Breaking change")
If this PR changes existing behaviour in a way that may require action before an
update, add a
breaking-changeadvisory block to this PR body. The website andthe in-container update guard read it to tell operators exactly what to expect,
what to do first, and — with
action: block— to stop an update until it'shandled. Every field is optional; the advisory auto-expires 30 days after merge.
Copy the block out of the comment below, fill it in, and paste it here: