Skip to content

Commit a8c44eb

Browse files
committed
ci(auto-sync): pin gh CLI to GITHUB_REPOSITORY via GH_REPO
The conflict-case path runs 'git checkout -B ${PR_BRANCH} upstream/main' which sets the new branch's upstream-tracking to the upstream remote (router-for-me/CLIProxyAPI). The gh CLI then infers the current repo from that tracking and targets upstream — leading to: HTTP 403: Resource not accessible by integration (https://api.github.com/repos/router-for-me/CLIProxyAPI/labels) could not add label: 'auto-sync' not found Setting GH_REPO at the step level pins every gh invocation to this repository regardless of git remote state.
1 parent 292d598 commit a8c44eb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

.github/workflows/auto-sync-upstream.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ jobs:
132132
if: steps.check.outputs.behind != '0' && (steps.merge.outputs.clean != 'true' || steps.build.outputs.ok != 'true')
133133
env:
134134
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
135+
GH_REPO: ${{ github.repository }}
135136
run: |
136137
set -e
137138

0 commit comments

Comments
 (0)