Skip to content

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

pr-scope: a sync PR carries upstream's new files by design, so skip the per-file guard

LNPANDY07783bf2313f
diff --git a/.github/workflows/pr-scope.yml b/.github/workflows/pr-scope.yml
index b12b8a2f..c7586e65 100644
--- a/.github/workflows/pr-scope.yml
+++ b/.github/workflows/pr-scope.yml
@@ -45,6 +45,14 @@ jobs:
OURS: ${{ steps.known.outputs.ours }}
PATCHED: ${{ steps.known.outputs.patched }}
run: |
+ # A sync PR carries upstream's own new files by design (hundreds of them, none in
+ # OURS or PATCHED because they are upstream's); the sync's own check_unprotected()
+ # already refused to write over an unprotected fork edit before this branch existed.
+ # Only normal PRs need the file-by-file guard.
+ if [[ "${GITHUB_HEAD_REF}" == sync/upstream-* ]]; then
+ echo "sync PR: the sync's own protection check ran; nothing to guard file by file."
+ exit 0
+ fi
# changed files = base...head, minus deletions (nothing to protect there)
BASE="${{ github.event.pull_request.base.sha }}"
HEAD="${{ github.event.pull_request.head.sha }}"