Skip to content

Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.

CI: the failure reports name the fork, so the issue is actually opened

LNPANDYfa1fb2155629
diff --git a/.github/workflows/daily-health.yml b/.github/workflows/daily-health.yml
index ac468fc1..8da84c55 100644
--- a/.github/workflows/daily-health.yml
+++ b/.github/workflows/daily-health.yml
@@ -71,8 +71,13 @@ jobs:
if: failure()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ # -R is not optional: the job adds an `upstream` remote (seedds/nxnative) to fetch, and gh
+ # picks its target repository by remote — the second one, not origin — so without this the
+ # issue went to upstream, where this token has no write access ("Resource not accessible by
+ # integration (createIssue)", 2026-10-27). A probe with the same permissions created the
+ # issue on the first try once -R named the fork.
run: |
- gh issue create \
+ gh issue create -R "${{ github.repository }}" \
--title "Daily health check failed $(date -u +%Y-%m-%d)" \
--body "The daily check found a problem. Nothing was changed — the tree on main is as it was.
diff --git a/.github/workflows/sync-upstream.yml b/.github/workflows/sync-upstream.yml
index 666168f4..1997309d 100644
--- a/.github/workflows/sync-upstream.yml
+++ b/.github/workflows/sync-upstream.yml
@@ -49,10 +49,12 @@ jobs:
if: failure()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ # -R, because the `upstream` remote added above makes gh resolve the target repository as
+ # seedds/nxnative, where this token cannot write (daily-health.yml has the full note).
run: |
NEW=$(git rev-parse upstream/main 2>/dev/null || echo '?')
tail -40 sync.log > sync-tail.log 2>/dev/null || echo "see the workflow log" > sync-tail.log
- gh issue create --title "Upstream sync failed at ${NEW:0:7}" \
+ gh issue create -R "${{ github.repository }}" --title "Upstream sync failed at ${NEW:0:7}" \
--body "The scheduled sync could not re-apply the fork's patches or verify the build. The tree is untouched on main; run scripts/sync_upstream.py locally to see the full picture.
\`\`\`