From c3aba3d8f700337651d906b1a1ad3ecfe88a075e Mon Sep 17 00:00:00 2001 From: Dmitriy Mozgovoy Date: Thu, 24 Apr 2025 17:37:56 +0300 Subject: [PATCH] chore(ci): add labeler github action; (#6888) --- .github/labeler.yml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/labeler.yml | 19 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..1c78b61 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,34 @@ + +"pr:docs": + - changed-files: + - any-glob-to-any-file: '**.md' + +"pr:code": + - changed-files: + - any-glob-to-any-file: 'lib/**.js' + +"pr:types": + - changed-files: + - any-glob-to-any-file: ['index.d.ts', 'index.d.cts'] + +"pr:tests": + - changed-files: + - any-glob-to-any-file: 'test/**.js' + +"pr:github-actions": + - changed-files: + - any-glob-to-any-file: '**.d.ts' + +"pr:examples": + - changed-files: + - any-glob-to-any-file: 'examples/**.js' + +"pr:ci": + - changed-files: + - any-glob-to-any-file: ['bin/**', 'rollup.config.js'] + +"pr:feature": + - head-branch: ['feature', 'feat'] + +"pr:fix": + - head-branch: ['fix', 'bug'] diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..aae2a4b --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,19 @@ +name: "Pull Request Labeler" +on: + pull_request_target: + workflow_dispatch: + inputs: + prs: + required: false + description: "pr number" + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + pr-number: github.event.inputs.prs