From 88782d8284ae806a2d0b8127d0cf591dd624e208 Mon Sep 17 00:00:00 2001 From: Tyler Ohlsen Date: Tue, 15 Mar 2022 16:37:56 -0700 Subject: [PATCH] Add auto labeler workflow (#205) Signed-off-by: Tyler Ohlsen (cherry picked from commit f028924aeb163966314e4b09bf524d49381ad8a2) --- .github/labeler.yml | 26 ++++++++++++++++++++++++++ .github/workflows/labeler.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 52 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 00000000..d193c61c --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,26 @@ +# Default all changes to backporting to 1.x branch +backport 1.x: +- '*' +- '*/*' +- '*/**/*' +- '*/**/**/*' +- '*/**/**/**/*' +- '*/**/**/**/**/*' +- '*/**/**/**/**/**/*' +- '*/**/**/**/**/**/**/*' +- '*/**/**/**/**/**/**/**/*' +- '*/**/**/**/**/**/**/**/**/*' +- '.github/**/*' + +# Adding "github actions" label to files in .github or its subdirectories +github actions: +- '.github/**/*' + +# Adding "documentation" label to markdown files or updating release notes +documentation: +- '*.md' +- 'release-notes/*' + +# Adding a "dependencies" label when yarn.lock is updated +dependencies: +- 'yarn.lock' \ No newline at end of file diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000..bac8e16a --- /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 }} \ No newline at end of file