From fe05833075034473d5ee7b6f6602e24a1f49f1c0 Mon Sep 17 00:00:00 2001 From: taskylizard <75871323+taskylizard@users.noreply.github.com> Date: Mon, 3 Jun 2024 06:58:45 +0000 Subject: [PATCH] chore(ci): setup labeler and auto-assign-action --- .github/labeler.yml | 7 +++++++ .github/workflows/labeler.yml | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000000..baa61be8a198 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,7 @@ +# See https://github.com/actions/labeler + +docs: +- '**/*.md' + +core: +- '.vitepress/**' diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 000000000000..a25e208f8011 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,24 @@ +name: 'Pull Request Labeler' +on: + - pull_request_target + +jobs: + triage: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Label PRs + uses: actions/labeler@v4 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Auto-assign to core PRs + if: contains(github.event.pull_request.labels.*.name, 'core') + uses: kentaro-m/auto-assign-action@v1 + with: + assignees: [taskylizard] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}