diff --git a/.github/auto_label_pr.yml b/.github/auto_label_pr.yml new file mode 100644 index 0000000..fcd2186 --- /dev/null +++ b/.github/auto_label_pr.yml @@ -0,0 +1,51 @@ +# .github/labeler.yml + +# Label for documentation changes +documentation: + - changed-files: + - any-glob-to-any-file: + - 'docs/**' + - 'README.md' + - 'CHANGELOG.md' + + +# Label for Docker changes +docker: + - changed-files: + - any-glob-to-any-file: + - '*docker*' + - 'Docker*' + +# Label for release-related changes +release: + - changed-files: + - any-glob-to-any-file: + - 'src/**' + - 'pyproject.toml' + - 'LICENCE' + +tests: + - changed-files: + - any-glob-to-any-file: + - 'tests/**' + +workflows: + - changed-files: + - any-glob-to-any-file: + - '.github/workflows/*' + - '.github/*' + +github: + - changed-files: + - any-glob-to-any-file: + - '.gitignore' + +feature: + - head-branch: ['^feature', 'feature'] + +patch: + - head-branch: ['^patch', 'patch', '^bug', 'bug'] + +ignore-pr-title-for-release: + - head-branch: ['develop'] + - base-branch: ['main'] \ No newline at end of file diff --git a/.github/workflows/autolabel-pr.yaml b/.github/workflows/autolabel-pr.yaml new file mode 100644 index 0000000..7c1ceb4 --- /dev/null +++ b/.github/workflows/autolabel-pr.yaml @@ -0,0 +1,22 @@ +name: Auto Label PRs + +on: + pull_request: + types: [opened, synchronize, reopened, edited] + +jobs: + label: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + outputs: + all-labels: ${{ steps.label-the-PR.outputs.all-labels }} + steps: + - name: Apply Labels + id: label-the-PR + uses: actions/labeler@v5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + configuration-path: .github/labeler.yml + sync-labels: true \ No newline at end of file