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" \