diff --git a/.github/labeler.yml b/.github/labeler.yml index 6f817c6fe..ff92fe680 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,7 +1,41 @@ -ci/cd: ['.github/**/*'] -completion: ['_zinit'] -docker: ['docker/*'] -docs: ['*.md', 'doc/**/*'] -scripts: ['scripts/*'] -tests: ['.zunit.yml', 'tests/**/*'] -zinit: ['_zinit', 'zinit*.zsh'] +ci/cd: +- changed-files: + - any-glob-to-any-file: '.github/**' + +docker: +- changed-files: + - any-glob-to-any-file: 'docker/**' + +scripts: +- changed-files: + - any-glob-to-any-file: 'docker/**' + +tests: +- changed-files: + - any-glob-to-any-file: ['.zunit.yml', 'tests/**/*'] + +completion: +- changed-files: + - any-glob-to-any-file: '_zinit' + +# Add 'Documentation' label to any file changes within 'docs' folder +docs: +- changed-files: + - any-glob-to-any-file: 'doc/**' + - any-glob-to-any-file: '**/*.md' + +# Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder +zinit: + - changed-files: + - any-glob-to-any-file: 'zinit*.zsh*' + +# 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: ['^feat'] + +fix: + - head-branch: ['^fix'] + + # Add 'release' label to any PR that is opened against the `main` branch +release: + - base-branch: 'main' diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml index 8a3362dbb..0d9976125 100644 --- a/.github/workflows/labeler.yaml +++ b/.github/workflows/labeler.yaml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/labeler@v4 + - uses: actions/labeler@v5 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" sync-labels: true diff --git a/.github/workflows/linting.yaml b/.github/workflows/linting.yaml index ee228f204..ca8acd984 100644 --- a/.github/workflows/linting.yaml +++ b/.github/workflows/linting.yaml @@ -19,7 +19,7 @@ jobs: with: fetch-depth: '0' - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 - name: install dependencies run: |