From d5aade00e8c7b015c1a172d6f81f7c0c5b9e4439 Mon Sep 17 00:00:00 2001 From: Sangwoon Park <81661259+ryanproback@users.noreply.github.com> Date: Sat, 28 Mar 2026 15:59:30 +0900 Subject: [PATCH 1/2] =?UTF-8?q?ci:=20=EC=A0=95=EC=B1=85=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20=EA=B0=90=EC=A7=80=20=EC=8B=9C=20boolti-docs?= =?UTF-8?q?=EB=A1=9C=20dispatch=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/notify-policy-changes.yml | 44 +++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/notify-policy-changes.yml diff --git a/.github/workflows/notify-policy-changes.yml b/.github/workflows/notify-policy-changes.yml new file mode 100644 index 00000000..d2d138c5 --- /dev/null +++ b/.github/workflows/notify-policy-changes.yml @@ -0,0 +1,44 @@ +name: Notify Policy Changes + +on: + push: + branches: [main] + paths: + - 'Boolti/Boolti/Sources/**' + +jobs: + dispatch: + name: Dispatch to boolti-docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Collect changed files + id: changes + run: | + FILES=$(git diff --name-only HEAD~1 HEAD -- \ + 'Boolti/Boolti/Sources/**') + COUNT=$(echo "$FILES" | wc -l | tr -d ' ') + LIST=$(echo "$FILES" | head -10 | sed 's/^/- /') + echo "count=$COUNT" >> $GITHUB_OUTPUT + { + echo "list<> $GITHUB_OUTPUT + + - name: Dispatch to boolti-docs + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.DOCS_DISPATCH_TOKEN }} + repository: ryanproback/boolti-docs + event-type: policy-changed + client-payload: | + { + "source_repo": "Nexters/Boolti-iOS", + "commit_sha": "${{ github.sha }}", + "file_count": "${{ steps.changes.outputs.count }}", + "changed_files": "${{ steps.changes.outputs.list }}" + } From 21ca88add7ab7f4be72c2ad0f80044c9279b3b4e Mon Sep 17 00:00:00 2001 From: Sangwoon Park <81661259+ryanproback@users.noreply.github.com> Date: Tue, 7 Apr 2026 13:40:48 +0900 Subject: [PATCH 2/2] fix: escape newlines in changed_files JSON value Use jq -Rs to escape raw newlines in the LIST variable, preventing 'Bad control character in string literal' JSON parse errors in the repository-dispatch client-payload. --- .github/workflows/notify-policy-changes.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/notify-policy-changes.yml b/.github/workflows/notify-policy-changes.yml index d2d138c5..1bd211fd 100644 --- a/.github/workflows/notify-policy-changes.yml +++ b/.github/workflows/notify-policy-changes.yml @@ -21,7 +21,8 @@ jobs: FILES=$(git diff --name-only HEAD~1 HEAD -- \ 'Boolti/Boolti/Sources/**') COUNT=$(echo "$FILES" | wc -l | tr -d ' ') - LIST=$(echo "$FILES" | head -10 | sed 's/^/- /') + LIST=$(echo "$FILES" | head -10 | sed 's/^/- /' | jq -Rs '.') + LIST=${LIST:1:-1} # strip outer quotes from jq output echo "count=$COUNT" >> $GITHUB_OUTPUT { echo "list<