Skip to content

Commit

Permalink
feat: auto assign label to pr at workflow (#5)
Browse files Browse the repository at this point in the history
* feat: auto assign label to pr at workflow

* chore: add eol in labeler yml

* fix: remove space in starting command

* feat: add test label

* fix: labeler with synchronize pull-request

---------

Co-authored-by: hee-suh <suhee0206@gmail.com>
  • Loading branch information
poiu694 and hee-suh authored May 16, 2024
1 parent df58b4e commit 5db5f54
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
documentation:
- changed-files:
- any-glob-to-any-file: ['**/*.md', '**/*.pdf']
- head-branch: ['!docs', 'docs', '!documentation', 'documentation']

feature:
- head-branch: ['^feat', 'feat', '^feature', 'feature']

refactor:
- head-branch: ['^refactor', 'refactor']

fix:
- head-branch: ['^fix', 'fix']

bug:
- head-branch: ['^bug', 'bug']

config:
- head-branch: ['^config', 'config']

test:
- head-branch: ['^test', 'test']
16 changes: 16 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'auto assign label to pull request'

on:
pull_request:
types: [synchronize]

jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
with:
repo-token: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 5db5f54

Please sign in to comment.