From 3c88d598fe0dc9bf6287ebb4e767e87705d075c8 Mon Sep 17 00:00:00 2001 From: neverland Date: Sat, 23 Mar 2024 11:38:33 +0800 Subject: [PATCH] chore(workflow): add PR labeler (#850) --- .github/pr-labeler.yml | 10 ++++++++++ .github/workflows/pr-label.yaml | 21 +++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .github/pr-labeler.yml create mode 100644 .github/workflows/pr-label.yaml diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml new file mode 100644 index 000000000..c2ebf464e --- /dev/null +++ b/.github/pr-labeler.yml @@ -0,0 +1,10 @@ +"change: feat": + - "/^(feat|types|style)/" +"change: fix": + - "/^fix/" +"change: perf": + - "/^perf/" +"change: breaking": + - "/^breaking change/" +"change: docs": + - "/^docs/" diff --git a/.github/workflows/pr-label.yaml b/.github/workflows/pr-label.yaml new file mode 100644 index 000000000..b8acfe357 --- /dev/null +++ b/.github/workflows/pr-label.yaml @@ -0,0 +1,21 @@ +name: PR Labeler + +on: + pull_request_target: + types: + - opened + - edited + +jobs: + change-labeling: + name: Labeling for changes + runs-on: ubuntu-latest + if: github.repository == 'web-infra-dev/rspress' + steps: + - uses: github/issue-labeler@v3.4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/pr-labeler.yml + enable-versioned-regex: 0 + include-title: 1 + sync-labels: 1