diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..d8fcd80 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,38 @@ +# Path-based labels applied to PRs by .github/workflows/labeler.yml. +# Uses actions/labeler@v5 match rules. + +docs: + - changed-files: + - any-glob-to-any-file: + - "docs/**" + +app: + - changed-files: + - any-glob-to-any-file: + - "PyMemoryEditor/app/**" + +linux: + - changed-files: + - any-glob-to-any-file: + - "PyMemoryEditor/linux/**" + +win32: + - changed-files: + - any-glob-to-any-file: + - "PyMemoryEditor/win32/**" + +macOS: + - changed-files: + - any-glob-to-any-file: + - "PyMemoryEditor/macos/**" + +# Any change inside the PyMemoryEditor package. +lib: + - changed-files: + - any-glob-to-any-file: + - "PyMemoryEditor/**" + +tests: + - changed-files: + - any-glob-to-any-file: + - "tests/**" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..3f89597 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,27 @@ +name: Labeler + +on: + pull_request_target: + types: + - opened + - synchronize + - reopened + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +permissions: + contents: read + pull-requests: write + +jobs: + label: + name: Label PR by changed files + runs-on: ubuntu-latest + steps: + - name: Apply labels + uses: actions/labeler@v5 + with: + configuration-path: .github/labeler.yml + sync-labels: true