Skip to content

Commit

Permalink
chore: added GHA Labeler
Browse files Browse the repository at this point in the history
Signed-off-by: manhtukhang <[email protected]>
  • Loading branch information
manhtukhang committed Dec 2, 2024
1 parent 8f96209 commit 2b3f8dd
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Add 'others' label to any file changes
others:
- changed-files:
- any-glob-to-any-file: '**'

# Add 'Documentation' label to any file changes within 'docs' or 'guides' folders
documentation:
- changed-files:
- any-glob-to-any-file:
- 'docs/**'
- 'guides/**'
- '**/*.md'
- '**/*.MD'

# Add 'source' label to any change to src files
source:
- all:
- changed-files:
- any-glob-to-any-file:
- 'src/**/*'
- 'go.mod'
- 'go.sum'

# Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name
feature:
- head-branch:
- '^feature'
- '^feat'
- 'feature'
- 'feat'

# Add 'bug' label to any PR where the head branch name starts with `bug` or has a `fix` section in the name
bug:
- head-branch:
- '^bug'
- '^fix'
- 'bug'
- 'fix'
16 changes: 16 additions & 0 deletions .github/workflows/labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Labeler
on: [pull_request]

jobs:
label:

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: ".github/labeler.yaml"

0 comments on commit 2b3f8dd

Please sign in to comment.