From 69cb7ded0417931b24ad7eade34069d1d2eacbad Mon Sep 17 00:00:00 2001 From: thinkasany <480968828@qq.com> Date: Wed, 23 Apr 2025 12:14:35 +0800 Subject: [PATCH] ci: add pr-add-label action (#4368) --- .github/workflows/pr-add-label.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/pr-add-label.yml diff --git a/.github/workflows/pr-add-label.yml b/.github/workflows/pr-add-label.yml new file mode 100644 index 0000000000000..82661e9eb237e --- /dev/null +++ b/.github/workflows/pr-add-label.yml @@ -0,0 +1,25 @@ +name: pr-add-label + +on: + pull_request_target: + types: [opened, edited, reopened, synchronize] + +jobs: + add-label: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + if: github.repository == 'doocs/leetcode' + steps: + - name: Check PR number + id: pr_number + run: echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV + + - name: Run add-label Action + uses: actionv/pr-label-action@master + with: + github_token: ${{ secrets.DOOCS_BOT_ACTION_TOKEN }} + pr_number: ${{ env.PR_NUMBER }} + organize_name: "doocs" + team_name: "leetcode-algorithm"