From 30c4a5c9954a5df80051ec800d12a0d66d6aefb1 Mon Sep 17 00:00:00 2001 From: baxyz Date: Sun, 19 Jul 2026 23:45:13 +0000 Subject: [PATCH] =?UTF-8?q?fix(CI-CD):=20=F0=9F=90=9B=20fix=20website=20di?= =?UTF-8?q?spatch=20client=5Fpayload=20as=20object?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5 --- .github/workflows/release.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 609239e..33db30a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -173,13 +173,20 @@ jobs: echo "$CHANGED" | jq -c '.[]' | while read -r row; do name=$(jq -r '.name' <<< "$row") version=$(jq -r '.version' <<< "$row") - payload=$(jq -nc --arg n "$name" --arg v "$version" --arg sha "${{ github.sha }}" \ - '{feature:$n, version:$v, ref:$sha, sha:$sha, source:"devcontainer-release"}') echo "→ dispatch website: $name v$version" + # client_payload must be a JSON object, not a stringified one — + # gh api's "field[nested]=value" bracket syntax builds it as such. + # (A previous version passed a pre-serialized JSON string via + # --raw-field, which the API rejects with HTTP 422.) gh api \ -X POST \ -H "Accept: application/vnd.github+json" \ "/repos/helpers4/website/dispatches" \ -f event_type=devcontainer-release \ - --raw-field "client_payload=$payload" || echo "⚠️ dispatch failed for $name" + -f "client_payload[feature]=$name" \ + -f "client_payload[version]=$version" \ + -f "client_payload[ref]=${{ github.sha }}" \ + -f "client_payload[sha]=${{ github.sha }}" \ + -f "client_payload[source]=devcontainer-release" \ + || echo "⚠️ dispatch failed for $name" done