From 179aa92c351b458aaff368871f3225879e029ed0 Mon Sep 17 00:00:00 2001 From: sagitchu <601096721@qq.com> Date: Tue, 18 Mar 2025 16:51:43 +0800 Subject: [PATCH] fix: try to use default token --- .github/workflows/sync-upstream.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync-upstream.yml b/.github/workflows/sync-upstream.yml index 5c2c6d24..77226cd0 100644 --- a/.github/workflows/sync-upstream.yml +++ b/.github/workflows/sync-upstream.yml @@ -8,6 +8,9 @@ on: jobs: sync: runs-on: ubuntu-latest + permissions: # 添加必要的权限 + pull-requests: write + contents: write steps: - name: Checkout uses: actions/checkout@v3 @@ -15,7 +18,8 @@ jobs: - name: Sync upstream pull requests uses: actions/github-script@v6 with: - github-token: ${{ secrets.TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} # 使用默认的 GITHUB_TOKEN + # 或者使用您的自定义 token: ${{ secrets.YOUR_PAT }} script: | const upstream = 'songquanpeng/one-api'; // 替换为实际的上游仓库 const [owner, repo] = upstream.split('/');