debug(bot): show raw field values in method list when count=0

This commit is contained in:
CanbiZ (MickLesk)
2026-03-18 19:36:51 +01:00
parent 71c02e052b
commit 8bb2f28b48

13
.github/workflows/pocketbase-bot.yml generated vendored
View File

@@ -430,9 +430,20 @@ jobs:
if (methodListMode) {
await addReaction('+1');
let debugInfo = '';
if (methodsArr.length === 0) {
const rawJson = record.install_methods_json;
const expandedIds = Array.isArray(record.install_methods) ? record.install_methods : [];
const expandData = record.expand && record.expand.install_methods;
debugInfo = '\n\n<details><summary>Debug info</summary>\n\n' +
'- `install_methods_json` raw: `' + JSON.stringify(rawJson) + '`\n' +
'- `install_methods` IDs: `' + JSON.stringify(expandedIds) + '`\n' +
'- expand present: `' + (expandData ? JSON.stringify(expandData) : 'none') + '`\n' +
'</details>';
}
await postComment(
' **PocketBase Bot**: Install methods for **`' + slug + '`** (' + methodsArr.length + ' total)\n\n' +
formatMethodsList(methodsArr)
formatMethodsList(methodsArr) + debugInfo
);
} else {
// Parse: <type> cpu=N ram=N hdd=N