From ea8781a9756501a9cd02de5a7f30ad7724887ac2 Mon Sep 17 00:00:00 2001 From: erezrokah Date: Wed, 10 Jun 2020 15:53:11 +0300 Subject: [PATCH] ci: add labeler action --- .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..7d9a574e --- /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'