From fa55db207dba660c75081d6d0effdc89e0c1eedc Mon Sep 17 00:00:00 2001 From: JGAntunes Date: Thu, 21 Jan 2021 16:51:52 +0000 Subject: [PATCH] chore(actions): add labeler --- .github/workflows/labeler.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 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 0000000..940a05f --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,26 @@ +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 + strategy: + matrix: + pr: + [ + { prefix: 'fix', type: 'bug' }, + { prefix: 'chore', type: 'chore' }, + { prefix: 'test', type: 'chore' }, + { prefix: 'ci', type: 'chore' }, + { prefix: 'feat', type: 'feature' }, + { prefix: 'security', type: 'security' }, + ] + steps: + - uses: netlify/pr-labeler-action@v1.0.0 + if: startsWith(github.event.pull_request.title, matrix.pr.prefix) + with: + token: '${{ secrets.GITHUB_TOKEN }}' + label: 'type: ${{ matrix.pr.type }}'