diff --git a/.github/labeler.yaml b/.github/labeler.yaml deleted file mode 100644 index 7cf5ad8..0000000 --- a/.github/labeler.yaml +++ /dev/null @@ -1,31 +0,0 @@ -chore: - - pr-title: - - '\bchore\b' - -docs: - - pr-title: - - '\bdocs\b' - -feat: - - pr-title: - - '\bfeat\b' - -fix: - - pr-title: - - '\bfix\b' - -refactor: - - pr-title: - - '\brefactor\b' - -remove: - - pr-title: - - '\bremove\b' - -style: - - pr-title: - - '\bstyle\b' - -test: - - pr-title: - - '\btest\b' diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..d38ded7 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,23 @@ +feat: +- head-branch: [ '^feat', 'feat/' ] + +fix: +- head-branch: [ '^fix', 'fix/' ] + +chore: +- head-branch: [ '^chore', 'chore/' ] + +docs: +- head-branch: [ '^docs', 'docs/' ] + +refactor: +- head-branch: [ '^refactor', 'refactor/' ] + +remove: +- head-branch: [ '^remove', 'remove/' ] + +style: +- head-branch: [ '^style', 'style/' ] + +test: +- head-branch: [ '^test', 'test/' ] diff --git a/.github/workflows/pr-auto-labeler.yaml b/.github/workflows/pr-auto-labeler.yaml index dcf79fd..a9c53dd 100644 --- a/.github/workflows/pr-auto-labeler.yaml +++ b/.github/workflows/pr-auto-labeler.yaml @@ -1,4 +1,4 @@ -name: PR Auto Labeler +name: Pull Request Auto Labeler on: pull_request_target: @@ -9,15 +9,7 @@ permissions: pull-requests: write jobs: - apply-labels: + labeler: runs-on: ubuntu-latest steps: - uses: actions/labeler@v5 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - configuration-path: .github/labeler.yaml - - - name: Log result - if: always() - run: | - echo "Labeled PR #${{ github.event.pull_request.number }} in ${{ github.repository }}"