Commit Graph

563 Commits

Author SHA1 Message Date
Michel Roegl-Brunner
354ceef128 fix(pocketbase-ai-bot): open CT-defaults sync PR with built-in GITHUB_TOKEN
The App installation token lacks contents:write, so creating the
pocketbase-sync/<slug> branch failed with 403 "Resource not accessible by
integration". Mirror the slash bot: run the CT-defaults branch/commit/PR
operations with the built-in GITHUB_TOKEN (workflow now requests
contents:write + pull-requests:write), while the App token still posts the
user-facing comments/reactions. ensureBranch/upsertCtDefaultsPr shadow
ghRequest with a GITHUB_TOKEN-authenticated ghDefault.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 14:11:43 +02:00
Michel Roegl-Brunner
1a6dbb0bf8 fix(pocketbase-ai-bot): use @pocketbase-bot handle and harden confirm flow
- Trigger and all user-facing text now use @pocketbase-bot (the bare
  @pocketbase handle collides with an existing account)
- Confirm flow only trusts a pocketbase-pending marker found in a comment
  authored by this bot app (performed_via_github_app.id == PB_BOT_APP_ID),
  preventing a forged-marker spoof; decoded operations are re-validated
  against the field/op allow-lists before applying (shared sanitizeOperations)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 14:03:17 +02:00
Michel Roegl-Brunner
f14eca3bc9 feat(pocketbase-ai-bot): natural-language @pocketbase bot via GitHub Models
Adds an isolated workflow that lets maintainers manage PocketBase script
records in plain English by mentioning @pocketbase in an issue/PR comment
(e.g. "@pocketbase change RAM to 4096 on zigbee2mqtt").

- Interprets the request with GitHub Models (built-in GITHUB_TOKEN + models:read)
- Posts under a dedicated GitHub App identity (PB_BOT_APP_ID/PB_BOT_APP_PRIVATE_KEY)
- Propose-then-confirm: replies with the parsed change set and a hidden marker;
  applies only after "@pocketbase confirm"
- Reuses the slash bot's field/note/method allow-lists, validation, revalidate,
  and CT-defaults sync PR logic; self-author guard prevents trigger loops
- Existing /pocketbase slash bot is untouched (triggers do not overlap)

Inert until the GitHub App is created and its two secrets are added.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 13:54:12 +02:00
Michel Roegl-Brunner
d4b4880e0d fix(pocketbase-bot): recognize /pocketbase command on any line of a comment
- Job gate uses contains() instead of startsWith() so comments with leading
  text still trigger the bot
- Script scans all lines for the first one starting with /pocketbase, instead
  of only reading line 0
- Command-line detection moved above the permission check so mid-sentence
  mentions exit silently without a "not authorized" reply

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 11:52:47 +02:00
Michel Roegl-Brunner
9dc08aa8c1 ci(workflows): harden new-script close, slug-match VED issue close, 7-day lock
- close-new-script-prs: trigger on added script file OR label, exempt by
  author_association (OWNER/MEMBER/COLLABORATOR) instead of team API
- close_issue_in_dev: match VED issues by derived slug, close all matches
- lock-issue: lock closed issues after 7 days instead of 3

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 11:43:08 +02:00
Michel Roegl-Brunner
5668ad9a8d fix(workflow): only flag node drift when local is behind upstream (#14874)
Update the node version drift check to count drift only when our script version is lower than upstream, so newer local versions no longer create false-positive drift issues.

Co-authored-by: Michel Roegl-Brunner <michel.roegl-brunner@example.com>
2026-06-02 10:25:05 +02:00
community-scripts-pr-app[bot]
4e51373669 Archive old changelog entries (#14822)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-31 00:22:31 +00:00
community-scripts-pr-app[bot]
5bf9cfb800 Archive old changelog entries (#14681)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-24 00:20:15 +00:00
Sam Heinz
69aa93a83a workflows: update workflows, templates to support arm64. (#14653)
* set 'var_arm64' to no in all ct scripts

* update files in .github to support arm64
2026-05-23 07:46:44 +10:00
community-scripts-pr-app[bot]
16cc639e1e Archive old changelog entries (#14537)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-17 00:18:35 +00:00
community-scripts-pr-app[bot]
28311987ae Archive old changelog entries (#14374)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-10 00:17:15 +00:00
community-scripts-pr-app[bot]
01d6df5903 Archive old changelog entries (#14208)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-03 00:15:35 +00:00
CanbiZ (MickLesk)
c5cbb46743 Enhance issue matching and redirect handling in close_issue_in_dev workflow 2026-04-29 14:04:04 +02:00
Michel Roegl-Brunner
513e58b5d1 enhance pocketbase bot 2026-04-28 10:10:05 +02:00
community-scripts-pr-app[bot]
1c49bab0bc Archive old changelog entries (#14025)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-26 00:12:14 +00:00
CanbiZ (MickLesk)
ec3b79bb61 PocketBase Bot: fix field names notes_json -> notes, install_methods_json -> install_methods
Collection fields were renamed but bot still used old _json suffixed names.
2026-04-20 09:02:27 +02:00
CanbiZ (MickLesk)
d95073f505 PocketBase Bot: fix double-stringify on notes_json patch
notes_json was sent as JSON.stringify(arr) inside JSON.stringify(),
causing PocketBase to receive a string instead of a JSON array.
patchMethods already does it correctly — align patchNotes.
2026-04-20 08:53:34 +02:00
community-scripts-pr-app[bot]
eba01133f4 Archive old changelog entries (#13842)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-19 00:10:06 +00:00
CanbiZ (MickLesk)
997e05dfb1 cleanup: remove docs/, update README & CONTRIBUTING, fix repo config (#13770) 2026-04-15 15:39:19 +02:00
CanbiZ (MickLesk)
a9c2307b0e 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.
2026-04-14 15:37:50 +02:00
community-scripts-pr-app[bot]
7c6460f903 Archive old changelog entries (#13677)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-12 00:09:31 +00:00
community-scripts-pr-app[bot]
f2d6840756 Archive old changelog entries (#13530)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-05 00:07:55 +00:00
community-scripts-pr-app[bot]
2f51b6c13c Archive old changelog entries (#13384)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-29 00:07:33 +00:00
CanbiZ (MickLesk)
caf03fe274 chore: replace helper-scripts.com with community-scripts.com (#13244) 2026-03-24 20:50:40 +01:00
CanbiZ (MickLesk)
7e470080b6 Update script timestamp handling and dev promotion
Compute today's date once and use a consolidated patchBody for PATCH requests (including last_update_commit from PR_URL/COMMIT_URL). Add logic to promote dev scripts on merge: if record.is_dev === true, set is_dev to false and script_created to today, and log the promotion. Replace the previous duplicated date construction with the new patchBody.
2026-03-23 10:37:57 +01:00
community-scripts-pr-app[bot]
9c86e0f133 Archive old changelog entries (#13175)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-22 00:05:42 +00:00
CanbiZ (MickLesk)
1754b68327 github: add PocketBase bot workflow (#13075) 2026-03-19 08:34:26 +01:00
CanbiZ (MickLesk)
192e2950e7 chore: fix pocketbase workflows 2026-03-18 16:57:20 +01:00
community-scripts-pr-app[bot]
7c0c153691 Archive old changelog entries (#12904)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-15 00:06:57 +00:00
Michel Roegl-Brunner
32a30edcea Update: Docs/website metadata workflow (#12858) 2026-03-13 15:15:21 +01:00
Michel Roegl-Brunner
070f1120e6 Rename workflow for PocketBase entry deletion 2026-03-12 16:17:13 +01:00
Michel Roegl-Brunner
ef942a61c0 Cleanup workflows (#12818)
* Cleanup Workflows

* Cleanup unneded workflows
2026-03-12 14:29:48 +01:00
CanbiZ (MickLesk)
bfedeb0277 Cleanup: remove frontend, move JSONs to json/ top-level (#12813) 2026-03-12 13:59:18 +01:00
Michel Roegl-Brunner
968e96e2c7 Delete removed scripts from pocketbase 2026-03-11 13:37:35 +01:00
Michel Roegl-Brunner
ad1e207ee1 Add GitHub Actions workflow for Pages redirect 2026-03-11 08:37:46 +01:00
Michel Roegl-Brunner
516d8d7a0f toggle is_dev to false when a new script gets merged 2026-03-10 16:07:51 +01:00
Michel Roegl-Brunner
a11f282a43 Update workflow 2026-03-10 15:44:28 +01:00
Michel Roegl-Brunner
eba96a55d2 New workflow to update last updated field in Database when a script gets changed, also adds last_update_link to link to the latest changes 2026-03-10 15:33:15 +01:00
Michel Roegl-Brunner
37f4585110 New workflow to update last updated field in Database when a script gets changed, also adds last_update_link to link to the latest changes 2026-03-10 15:33:15 +01:00
community-scripts-pr-app[bot]
1e5d52098c Archive old changelog entries (#12663)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-08 00:04:39 +00:00
Michel Roegl-Brunner
6fbd785a87 Change runner to self-hosted for PR checks 2026-03-06 09:09:56 +01:00
Michel Roegl-Brunner
88d1494e46 Adapt workflow 2026-03-02 16:28:35 +01:00
Michel Roegl-Brunner
b39e296684 Workflow test 2026-03-02 15:35:28 +01:00
Michel Roegl-Brunner
7d5900de18 Add workflow to push json changes to pocketbase 2026-03-02 15:26:41 +01:00
Michel Roegl-Brunner
bdad2cc941 Add workflow to push json changes to pocketbase 2026-03-02 14:46:31 +01:00
Michel Roegl-Brunner
00047c95b8 Add workflow to push json changes to pocketbase 2026-03-02 14:37:50 +01:00
Michel Roegl-Brunner
cea9858193 Add workflow to push json changes to pocketbase 2026-03-02 14:36:02 +01:00
Michel Roegl-Brunner
fc59910bd2 Add workflow to push json changes to pocketbase 2026-03-02 14:15:44 +01:00
community-scripts-pr-app[bot]
4dfa649a81 Archive old changelog entries (#12436)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-01 00:04:52 +00:00
CanbiZ (MickLesk)
3fb677d768 Add workflow to close unauthorized new-script PRs (#12356) 2026-02-26 15:53:47 +01:00