From 624604f33834272b190d04c2f0f0c3f79b2840a2 Mon Sep 17 00:00:00 2001 From: rust-learn-now Date: Tue, 26 Nov 2024 12:22:18 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[ISSUE=20#1323]=F0=9F=94=A8Update=20Github?= =?UTF-8?q?=20Actions=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/automerge.yml | 2 +- .github/workflows/remove-label-on-approve.yml | 2 +- .github/workflows/sync-issue-labels.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index c2174320..6e63dba3 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -24,7 +24,7 @@ jobs: - name: automerge uses: "pascalgn/automerge-action@v0.16.4" env: - GITHUB_TOKEN: "${{ secrets.BOT_TOKEN }}" + GITHUB_TOKEN: "${{ secrets.PAT }}" MERGE_LABELS: "approved,auto merge,!ready to review,!waiting-review" MERGE_METHOD: "squash" MERGE_COMMIT_MESSAGE: "automatic" diff --git a/.github/workflows/remove-label-on-approve.yml b/.github/workflows/remove-label-on-approve.yml index f1106931..6dcf813c 100644 --- a/.github/workflows/remove-label-on-approve.yml +++ b/.github/workflows/remove-label-on-approve.yml @@ -17,7 +17,7 @@ jobs: - name: Remove multiple labels using github-script uses: actions/github-script@v7 with: - github-token: ${{ secrets.BOT_TOKEN }} + github-token: ${{ secrets.PAT }} script: | const labelsToRemove = ['waiting-review','ready to review']; // Labels to remove diff --git a/.github/workflows/sync-issue-labels.yml b/.github/workflows/sync-issue-labels.yml index 87fab9e3..5ed7394b 100644 --- a/.github/workflows/sync-issue-labels.yml +++ b/.github/workflows/sync-issue-labels.yml @@ -17,7 +17,7 @@ jobs: - name: Sync Labels from Linked Issue uses: actions/github-script@v7 with: - github-token: ${{ secrets.BOT_TOKEN }} + github-token: ${{ secrets.PAT }} script: | // Extract linked issue numbers from the PR description const issueNumbers = context.payload.pull_request.body From 604f5c48d3dba369e0d05afeeafd4c2498ca5501 Mon Sep 17 00:00:00 2001 From: rust-learn-now Date: Tue, 26 Nov 2024 12:30:10 +0800 Subject: [PATCH 2/3] fix --- .github/workflows/automerge.yml | 2 +- .github/workflows/remove-label-on-approve.yml | 2 +- .github/workflows/sync-issue-labels.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 6e63dba3..8a5b3543 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -24,7 +24,7 @@ jobs: - name: automerge uses: "pascalgn/automerge-action@v0.16.4" env: - GITHUB_TOKEN: "${{ secrets.PAT }}" + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" MERGE_LABELS: "approved,auto merge,!ready to review,!waiting-review" MERGE_METHOD: "squash" MERGE_COMMIT_MESSAGE: "automatic" diff --git a/.github/workflows/remove-label-on-approve.yml b/.github/workflows/remove-label-on-approve.yml index 6dcf813c..cee157f8 100644 --- a/.github/workflows/remove-label-on-approve.yml +++ b/.github/workflows/remove-label-on-approve.yml @@ -17,7 +17,7 @@ jobs: - name: Remove multiple labels using github-script uses: actions/github-script@v7 with: - github-token: ${{ secrets.PAT }} + github-token: ${{ secrets.GITHUB_TOKEN }} script: | const labelsToRemove = ['waiting-review','ready to review']; // Labels to remove diff --git a/.github/workflows/sync-issue-labels.yml b/.github/workflows/sync-issue-labels.yml index 5ed7394b..2ff6c6cc 100644 --- a/.github/workflows/sync-issue-labels.yml +++ b/.github/workflows/sync-issue-labels.yml @@ -17,7 +17,7 @@ jobs: - name: Sync Labels from Linked Issue uses: actions/github-script@v7 with: - github-token: ${{ secrets.PAT }} + github-token: ${{ secrets.GITHUB_TOKEN }} script: | // Extract linked issue numbers from the PR description const issueNumbers = context.payload.pull_request.body From 0f7e241d3b6663b997a2dcd2fde35382f7b70c0e Mon Sep 17 00:00:00 2001 From: rust-learn-now Date: Tue, 26 Nov 2024 12:39:14 +0800 Subject: [PATCH 3/3] add --- .github/workflows/associate_milestone_issue.yml | 2 +- .github/workflows/associate_milestone_pr.yml | 2 +- .github/workflows/automerge.yml | 2 +- .github/workflows/remove-label-on-approve.yml | 2 +- .github/workflows/sync-issue-labels.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/associate_milestone_issue.yml b/.github/workflows/associate_milestone_issue.yml index 2dc3b42b..a641ed35 100644 --- a/.github/workflows/associate_milestone_issue.yml +++ b/.github/workflows/associate_milestone_issue.yml @@ -13,7 +13,7 @@ jobs: - name: Associate Milestone uses: actions/github-script@v7 with: - github-token: ${{ secrets.BOT_TOKEN }} + github-token: ${{ secrets.BOT_TOKEN_1 }} script: | const { owner, repo } = context.repo; const issueNumber = context.issue.number; diff --git a/.github/workflows/associate_milestone_pr.yml b/.github/workflows/associate_milestone_pr.yml index 67fbfcba..cb00418b 100644 --- a/.github/workflows/associate_milestone_pr.yml +++ b/.github/workflows/associate_milestone_pr.yml @@ -13,7 +13,7 @@ jobs: - name: Associate Milestone uses: actions/github-script@v7 with: - github-token: ${{ secrets.BOT_TOKEN }} + github-token: ${{ secrets.BOT_TOKEN_1 }} script: | const { owner, repo } = context.repo; const issueNumber = context.issue.number; diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 8a5b3543..c2174320 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -24,7 +24,7 @@ jobs: - name: automerge uses: "pascalgn/automerge-action@v0.16.4" env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + GITHUB_TOKEN: "${{ secrets.BOT_TOKEN }}" MERGE_LABELS: "approved,auto merge,!ready to review,!waiting-review" MERGE_METHOD: "squash" MERGE_COMMIT_MESSAGE: "automatic" diff --git a/.github/workflows/remove-label-on-approve.yml b/.github/workflows/remove-label-on-approve.yml index cee157f8..f1106931 100644 --- a/.github/workflows/remove-label-on-approve.yml +++ b/.github/workflows/remove-label-on-approve.yml @@ -17,7 +17,7 @@ jobs: - name: Remove multiple labels using github-script uses: actions/github-script@v7 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.BOT_TOKEN }} script: | const labelsToRemove = ['waiting-review','ready to review']; // Labels to remove diff --git a/.github/workflows/sync-issue-labels.yml b/.github/workflows/sync-issue-labels.yml index 2ff6c6cc..87fab9e3 100644 --- a/.github/workflows/sync-issue-labels.yml +++ b/.github/workflows/sync-issue-labels.yml @@ -17,7 +17,7 @@ jobs: - name: Sync Labels from Linked Issue uses: actions/github-script@v7 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.BOT_TOKEN }} script: | // Extract linked issue numbers from the PR description const issueNumbers = context.payload.pull_request.body