mergify[bot] 2a376933f2
chore: pin GH Actions to commit sha (#765) (#801)
(cherry picked from commit 62801b3b1371a221f0c485abe50f22b005155fe7)

# Conflicts:
#	.github/workflows/fossa.yml

Co-authored-by: freeze <1615081+Vicente-Cheng@users.noreply.github.com>
2026-04-07 16:02:32 +08:00

31 lines
924 B
YAML

name: "[PR Management] Add PR Label"
on:
pull_request_target:
types: [opened, reopened, edited]
branches:
- main
- 'release-harvester-v*'
permissions:
pull-requests: write
jobs:
auto-assign-pr-label:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ github.base_ref }}
- name: Setup Nodejs and yarn install
uses: ./.github/actions/setup
- name: Set PR label
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_LABEL=$(node ./scripts/extract-release-label.mjs "${{ github.event.pull_request.title }}")
echo "PR_LABEL = $PR_LABEL"
gh pr edit ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --add-label "$PR_LABEL"