From 17285cc238dfb6d9266790836d8b2380bc2a28b5 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Tue, 22 Mar 2022 16:16:20 -0700 Subject: [PATCH] Add auto labeler workflow (#455) Signed-off-by: Tyler Ohlsen (cherry picked from commit 3bdb4f6b983cae870767f715ffaa2d33d8c0c81d) --- .github/labeler.yml | 21 +++++++++++++++++++++ .github/workflows/labeler.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 47 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 000000000..53dc0443c --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,21 @@ +backport 1.x: + - "*" + - "*/*" + - "*/**/*" + - "*/**/**/*" + - "*/**/**/**/*" + - "*/**/**/**/**/*" + - "*/**/**/**/**/**/*" + - "*/**/**/**/**/**/**/*" + - "*/**/**/**/**/**/**/**/*" + - "*/**/**/**/**/**/**/**/**/*" + - ".github/**/*" + +infra: + - ".github/**/*" + - "build.gradle" + +documentation: + - "*.md" + - "release-notes/*" + - "docs/*" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 000000000..2f51301a1 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,26 @@ +name: "Pull Request Labeler" +on: + pull_request_target: + branches: + - main + types: + - opened + +jobs: + label: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - name: GitHub App token + id: github_app_token + uses: tibdex/github-app-token@v1.5.0 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} + installation_id: 22958780 + - name: Label + uses: actions/labeler@v4 + with: + repo-token: ${{ steps.github_app_token.outputs.token }}