diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..e146abd --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,38 @@ +# Labeler configuration for ds-grading-env project +# Labels are automatically applied based on file paths in pull requests + +# Python labels +python: +- changed-files: + - any-glob-to-any-file: + - '**/*.py' + - 'requirements.txt' + +# Docker labels +docker: +- changed-files: + - any-glob-to-any-file: + - 'Dockerfile' + - 'docker-compose.yml' + - '.dockerignore' + +# Example files +example: +- changed-files: + - any-glob-to-any-file: + - 'example/**/*' + +# DevOps +devops: +- changed-files: + - any-glob-to-any-file: + - '.github/**/*' + - '.github/workflows/**/*' + +# Documentation +documentation: +- changed-files: + - any-glob-to-any-file: + - 'docs/**/*' + - '*.md' + - '**/*.md' diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..57993bd --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,23 @@ +name: "Pull Request Labeler" + +on: + pull_request: + types: [opened, synchronize, reopened] + +permissions: + contents: read + pull-requests: write + +jobs: + labeler: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Apply labels + uses: actions/labeler@v5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + configuration-path: .github/labeler.yml + sync-labels: true