ci: add pr-add-label action (#4368)

This commit is contained in:
thinkasany 2025-04-23 12:14:35 +08:00 committed by GitHub
parent 5ed8927e70
commit 69cb7ded04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 25 additions and 0 deletions

25
.github/workflows/pr-add-label.yml vendored Normal file
View File

@ -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"