mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-18 16:32:17 +00:00
Enhance PocketBase bot commands & revalidation
Add frontend revalidation and richer command handling for the PocketBase GitHub bot. Key changes: - Expose FRONTEND_URL and REVALIDATE_SECRET to workflow env and add a best-effort revalidate() helper to ping the frontend after edits. - Introduce shared parsing/helpers: parseKVPairs, parseTokens, readJsonBlob, formatNotesList, formatMethodsList, and other utilities to centralize logic. - Add an "info" subcommand to display script details, links, credentials, install methods and notes. - Improve note handling (add/edit/remove) to use shared parsers and call revalidate after updates; tweak messages and reactions. - Expand install method management: support add/remove/edit operations, new method fields (cpu, ram, hdd, os, version, config_path, script), validation of unknown fields, and better formatting. Persist install_methods_json as JSON (not stringified JSON) when PATCHing. - Replace ad-hoc field parsers with the shared key=value parser for field updates and SET handling; call revalidate after SET/field patches. - Update help text and minor message wording/formatting. - In push-json-to-pocketbase workflow, remove writing config_path from pushed payload. These changes aim to make the bot more robust, easier to extend, and ensure frontend caches are refreshed after data changes.
This commit is contained in:
1
.github/workflows/push-json-to-pocketbase.yml
generated
vendored
1
.github/workflows/push-json-to-pocketbase.yml
generated
vendored
@@ -170,7 +170,6 @@ jobs:
|
||||
website: data.website,
|
||||
logo: data.logo,
|
||||
description: data.description,
|
||||
config_path: data.config_path,
|
||||
default_user: (data.default_credentials && data.default_credentials.username) || data.default_user || null,
|
||||
default_passwd: (data.default_credentials && data.default_credentials.password) || data.default_passwd || null,
|
||||
is_dev: false
|
||||
|
||||
Reference in New Issue
Block a user