From a061fad9b1933414faa7e6a26bd3182c0ce6c9d7 Mon Sep 17 00:00:00 2001 From: Noel Sabia Date: Sun, 18 Oct 2026 16:08:39 +0200 Subject: [PATCH] fix(ci): JSON-encode review with node instead of jq The node:22-bookworm image does not ship jq. Also use the renamed PR_GITEA_TOKEN secret. --- .gitea/workflows/pr-checker.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/pr-checker.yml b/.gitea/workflows/pr-checker.yml index feb3c1a..b8707d9 100644 --- a/.gitea/workflows/pr-checker.yml +++ b/.gitea/workflows/pr-checker.yml @@ -214,12 +214,13 @@ jobs: - name: Post review as PR comment continue-on-error: true # token missing/expired must not fail the build env: - GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + GITEA_TOKEN: ${{ secrets.PR_GITEA_TOKEN }} PR_NUMBER: ${{ github.event.pull_request.number }} REPO: ${{ github.repository }} # Gitea sets GITHUB_API_URL, e.g. https://gitea.example.com/api/v1 run: | - BODY=$(jq -Rs . < /tmp/review.md) + # jq is not in the node image - use node for JSON encoding + BODY=$(node -e 'process.stdout.write(JSON.stringify(require("fs").readFileSync("/tmp/review.md","utf8")))') curl -sf -X POST \ -H "Authorization: token ${GITEA_TOKEN}" \ -H "Content-Type: application/json" \