From fc3dcfefc3e87ba9e60e3cd0c792069b69a97d21 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 5 Jun 2026 20:50:47 +0000 Subject: [PATCH 1/5] Initial plan From 198337c1f549d27646a89b95c967af6c07d7c109 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 5 Jun 2026 20:53:37 +0000 Subject: [PATCH 2/5] fix: make docs workflow resilient when wiki is unavailable --- .github/workflows/docs.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index db78be7..fd14958 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,6 +14,8 @@ on: jobs: build-docs: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout uses: actions/checkout@v4 @@ -30,10 +32,21 @@ jobs: - name: Generate API Docs run: npx typedoc --options typedoc.json + - name: Check wiki availability + id: wiki-check + env: + GH_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN || github.token }} + run: | + if git ls-remote "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.wiki.git" HEAD >/dev/null 2>&1; then + echo "exists=true" >> "$GITHUB_OUTPUT" + else + echo "exists=false" >> "$GITHUB_OUTPUT" + fi + - name: Sync Wiki + if: steps.wiki-check.outputs.exists == 'true' uses: Andrew-Chen-Wang/github-wiki-action@v4 with: - wiki_folder: docs/api - commit_message: "docs: update API documentation [skip ci]" - env: - WIKI_PUSH_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN }} + token: ${{ secrets.WIKI_ACTION_TOKEN || github.token }} + path: docs/api + commit-message: "docs: update API documentation [skip ci]" From d41d9b7edcd36493abc42946573f38a53ce881dc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 5 Jun 2026 20:56:41 +0000 Subject: [PATCH 3/5] fix: prevent docs workflow failure when wiki is unavailable --- .github/workflows/docs.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index fd14958..346408c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -35,8 +35,12 @@ jobs: - name: Check wiki availability id: wiki-check env: - GH_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN || github.token }} + GH_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN }} run: | + if [ -z "${GH_TOKEN}" ]; then + echo "exists=false" >> "$GITHUB_OUTPUT" + exit 0 + fi if git ls-remote "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.wiki.git" HEAD >/dev/null 2>&1; then echo "exists=true" >> "$GITHUB_OUTPUT" else @@ -47,6 +51,6 @@ jobs: if: steps.wiki-check.outputs.exists == 'true' uses: Andrew-Chen-Wang/github-wiki-action@v4 with: - token: ${{ secrets.WIKI_ACTION_TOKEN || github.token }} + token: ${{ secrets.WIKI_ACTION_TOKEN }} path: docs/api commit-message: "docs: update API documentation [skip ci]" From 7822d62113300719a29d12d36d60ecf941eaed65 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 5 Jun 2026 21:02:46 +0000 Subject: [PATCH 4/5] fix: enforce docs wiki sync with token fallback --- .github/workflows/docs.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 346408c..f88bd02 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -32,25 +32,18 @@ jobs: - name: Generate API Docs run: npx typedoc --options typedoc.json - - name: Check wiki availability - id: wiki-check + - name: Verify wiki repository availability env: - GH_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN }} + GH_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN != '' && secrets.WIKI_ACTION_TOKEN || github.token }} run: | - if [ -z "${GH_TOKEN}" ]; then - echo "exists=false" >> "$GITHUB_OUTPUT" - exit 0 - fi - if git ls-remote "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.wiki.git" HEAD >/dev/null 2>&1; then - echo "exists=true" >> "$GITHUB_OUTPUT" - else - echo "exists=false" >> "$GITHUB_OUTPUT" + if ! git ls-remote "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.wiki.git" HEAD >/dev/null 2>&1; then + echo "::error::GitHub wiki repository is unavailable. Enable the repository wiki and ensure token permissions allow wiki push." + exit 1 fi - name: Sync Wiki - if: steps.wiki-check.outputs.exists == 'true' uses: Andrew-Chen-Wang/github-wiki-action@v4 with: - token: ${{ secrets.WIKI_ACTION_TOKEN }} + token: ${{ secrets.WIKI_ACTION_TOKEN != '' && secrets.WIKI_ACTION_TOKEN || github.token }} path: docs/api commit-message: "docs: update API documentation [skip ci]" From 37c9afa7c29af22ab19a7fd1d3d6dd4ee4d7fbbd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 5 Jun 2026 21:03:56 +0000 Subject: [PATCH 5/5] fix: require wiki sync in docs workflow --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f88bd02..8f080e9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -34,7 +34,7 @@ jobs: - name: Verify wiki repository availability env: - GH_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN != '' && secrets.WIKI_ACTION_TOKEN || github.token }} + GH_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN || github.token }} run: | if ! git ls-remote "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.wiki.git" HEAD >/dev/null 2>&1; then echo "::error::GitHub wiki repository is unavailable. Enable the repository wiki and ensure token permissions allow wiki push." @@ -44,6 +44,6 @@ jobs: - name: Sync Wiki uses: Andrew-Chen-Wang/github-wiki-action@v4 with: - token: ${{ secrets.WIKI_ACTION_TOKEN != '' && secrets.WIKI_ACTION_TOKEN || github.token }} + token: ${{ secrets.WIKI_ACTION_TOKEN || github.token }} path: docs/api commit-message: "docs: update API documentation [skip ci]"