Skip to content

Commit

Permalink
ci: add pr labeler (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
erezrokah authored Aug 3, 2020
1 parent e489ba3 commit 6787a5c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 6787a5c

Please sign in to comment.