Use notes and install_methods fields

Update PocketBase bot and import workflow to use direct `notes` and `install_methods` fields instead of the older `notes_json`/`install_methods_json` relations. Adjust parsing, PATCH/POST payloads and error messages accordingly, remove project_url handling, and drop the separate resolution/creation of related note/install_method records in the import script. Also update docs to reflect the new field names and clean up some formatting and allowed-field lists.
This commit is contained in:
CanbiZ (MickLesk)
2026-04-14 13:57:03 +02:00
parent 41bae875cb
commit 935f9d9d3d
3 changed files with 32 additions and 123 deletions

View File

@@ -6,16 +6,20 @@
---
### 🔧 Field Updates
Simple key=value pairs. Multiple in one line.
```
/pocketbase <slug> field=value [field=value ...]
```
**Boolean fields** (`true`/`false`): `updateable` `privileged` `has_arm` `is_dev` `is_disabled` `is_deleted`
**Text fields**: `name` `description` `logo` `documentation` `website` `project_url` `github` `config_path` `disable_message` `deleted_message`
**Text fields**: `name` `description` `logo` `documentation` `website` `github` `config_path` `disable_message` `deleted_message`
**Number**: `port`
**Nullable**: `default_user` `default_passwd` *(empty value = null: `default_passwd=`)*
**Nullable**: `default_user` `default_passwd` _(empty value = null: `default_passwd=`)_
**Examples:**
```
/pocketbase homeassistant is_disabled=true disable_message="Broken upstream"
/pocketbase homeassistant documentation=https://www.home-assistant.io/docs
@@ -26,40 +30,48 @@ Simple key=value pairs. Multiple in one line.
---
### 📝 set — HTML / Multiline / Special Characters
Use a code block for values that contain HTML, links, quotes or newlines.
````
/pocketbase <slug> set <field>
```
Your content here — HTML tags, links, quotes, all fine
```
````
**Allowed fields:** `name` `description` `logo` `documentation` `website` `project_url` `github` `config_path` `disable_message` `deleted_message`
**Allowed fields:** `name` `description` `logo` `documentation` `website` `github` `config_path` `disable_message` `deleted_message`
---
### 🗒️ Notes
```
/pocketbase <slug> note list
/pocketbase <slug> note add <type> "<text>"
/pocketbase <slug> note edit <type> "<old text>" "<new text>"
/pocketbase <slug> note remove <type> "<text>"
```
Note types come from `z_ref_note_types` in PocketBase (e.g. `info`, `warning`).
Note types: `info`, `warning`.
If text doesn't match exactly, the bot lists all current notes automatically.
---
### ⚙️ Install Method Resources
```
/pocketbase <slug> method list
/pocketbase <slug> method <type> hdd=10
/pocketbase <slug> method <type> cpu=4 ram=2048 hdd=20
```
`<type>` matches the install method type name (e.g. `default`, `alpine`). Use `method list` to see available types and current values. `ram` = MB, `hdd` = GB.
---
### 💡 Tips
- The bot reacts with 👀 when it picks up the command, ✅ on success, 👎 on error
- On any error, a comment explains what went wrong
- `note edit` / `note remove` show the current note list if the text doesn't match