From 7b4a0810483ab5b8efcbe6c8eb1273df129543e6 Mon Sep 17 00:00:00 2001 From: Jatin K Malik Date: Thu, 11 Jun 2026 22:38:41 -0700 Subject: [PATCH] feat(ci): add automatic PR labeling workflow (#473) Configure actions/labeler@v5 to automatically label PRs based on file paths. Maps changes to: app, web, documentation, ci, tests, installer, resources, dependencies. Creates 6 new labels to complement existing issue labels for better PR organization. --- .github/labeler.yml | 62 +++++++++++++++++++++++++++++++++++ .github/workflows/labeler.yml | 18 ++++++++++ 2 files changed, 80 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..e38da32 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,62 @@ +# PR Labeler configuration +# See https://github.com/actions/labeler for details + +# Core Python application (src, packaging, desktop entry) +app: + - changed-files: + - any-glob-to-any-file: + - "src/**/*" + - "pyproject.toml" + - "MANIFEST.in" + - "vocalinux.desktop" + +# Next.js website +web: + - changed-files: + - any-glob-to-any-file: + - "web/**/*" + +# Documentation (docs dir, markdown files, license) +documentation: + - changed-files: + - any-glob-to-any-file: + - "docs/**/*" + - "*.md" + - "LICENSE" + +# CI/CD, build tooling, scripts, linting config +ci: + - changed-files: + - any-glob-to-any-file: + - ".github/**/*" + - "Makefile" + - "scripts/**/*" + - ".flake8" + - ".pre-commit-config.yaml" + +# Test suite +tests: + - changed-files: + - any-glob-to-any-file: + - "tests/**/*" + +# Installer / uninstaller scripts +installer: + - changed-files: + - any-glob-to-any-file: + - "install.sh" + - "uninstall.sh" + +# Icons, sounds, screenshots, promo assets +resources: + - changed-files: + - any-glob-to-any-file: + - "resources/**/*" + +# Dependency manifests +dependencies: + - changed-files: + - any-glob-to-any-file: + - "pyproject.toml" + - "web/package.json" + - "web/package-lock.json" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..11d1638 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,18 @@ +name: "Pull Request Labeler" + +on: + pull_request_target: + types: [opened, synchronize, reopened] + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - name: Label PR + uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true