From 6787a5cb896243ff08e3cae45c2ce44c0474e661 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Mon, 3 Aug 2020 05:04:18 -0700 Subject: [PATCH] ci: add pr labeler (#271) --- .github/workflows/labeler.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/labeler.yml diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000..ba807bea --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,30 @@ +name: Label PR +on: + pull_request: + types: [opened, edited] + +jobs: + label-pr: + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false + runs-on: ubuntu-latest + steps: + - uses: erezrokah/pr-labeler-action@v1.0.0 + if: startsWith(github.event.pull_request.title, 'fix') + with: + token: '${{ secrets.GITHUB_TOKEN }}' + label: 'type: bug' + - uses: erezrokah/pr-labeler-action@v1.0.0 + if: startsWith(github.event.pull_request.title, 'chore') || startsWith(github.event.pull_request.title, 'ci') + with: + token: '${{ secrets.GITHUB_TOKEN }}' + label: 'type: chore' + - uses: erezrokah/pr-labeler-action@v1.0.0 + if: startsWith(github.event.pull_request.title, 'feat') + with: + token: '${{ secrets.GITHUB_TOKEN }}' + label: 'type: feature' + - uses: erezrokah/pr-labeler-action@v1.0.0 + if: startsWith(github.event.pull_request.title, 'security') + with: + token: '${{ secrets.GITHUB_TOKEN }}' + label: 'type: security'