From f52a4fe7e5e64716f580f8f02a42e191dff542d4 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Wed, 20 Mar 2024 10:20:23 +0800 Subject: [PATCH] feat: set git cherry pick and Milestone (#2131) --- .github/workflows/bot-auto-cherry-pick.yml | 4 ++-- .github/workflows/milestone.yml | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bot-auto-cherry-pick.yml b/.github/workflows/bot-auto-cherry-pick.yml index baafecad7..cdd7241e2 100644 --- a/.github/workflows/bot-auto-cherry-pick.yml +++ b/.github/workflows/bot-auto-cherry-pick.yml @@ -25,6 +25,7 @@ jobs: - name: Comment cherry-pick command uses: actions/github-script@v7 with: + github-token: ${{ secrets.BOT_GITHUB_TOKEN }} script: | const pr = context.payload.pull_request; if (!pr.merged) { @@ -63,5 +64,4 @@ jobs: repo: context.repo.repo, issue_number: pr.number, body: cherryPickCmd - }); - github-token: ${{ secrets.BOT_GITHUB_TOKEN }} \ No newline at end of file + }); \ No newline at end of file diff --git a/.github/workflows/milestone.yml b/.github/workflows/milestone.yml index ecd64656a..c74e7074a 100644 --- a/.github/workflows/milestone.yml +++ b/.github/workflows/milestone.yml @@ -41,6 +41,7 @@ jobs: steps: - uses: actions/github-script@v7 # v6 with: + github-token: ${{ secrets.BOT_GITHUB_TOKEN }} script: | if (!context.payload.pull_request.merged) { console.log('PR was not merged, skipping.'); @@ -56,9 +57,10 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, state: 'open', - sort: 'due_on', - direction: 'asc' + sort: 'title', + direction: 'desc' }) + if (milestones.data.length === 0) { console.log('There are no milestones, skipping.'); return;