From ffd4d1f80eabf7ee9c89187a1fa858d1faa45a99 Mon Sep 17 00:00:00 2001 From: Gold856 <117957790+Gold856@users.noreply.github.com> Date: Mon, 4 Aug 2025 15:18:52 -0400 Subject: [PATCH] Add PR labeler (#2031) ## Description It's nice to be able to filter PRs by what components they've modified. The 5 labels that have been selected are `frontend`, `backend`, `documentation`, `photonlib`, and `website`, since those are the primary components in the monorepo. ## Meta Merge checklist: - [x] Pull Request title is [short, imperative summary](https://cbea.ms/git-commit/) of proposed changes - [x] The description documents the _what_ and _why_ - [ ] If this PR changes behavior or adds a feature, user documentation is updated - [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly - [ ] If this PR touches configuration, this is backwards compatible with settings back to v2024.3.1 - [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated - [ ] If this PR addresses a bug, a regression test for it is added --- .github/labeler.yml | 16 ++++++++++++++++ .github/workflows/labeler.yml | 14 ++++++++++++++ 2 files changed, 30 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 000000000..8fca6ed93 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,16 @@ +"backend": + - changed-files: + - any-glob-to-any-file: [photon-core/**, photon-server/**] + - all-globs-to-all-files: "!photon-server/src/main/resources/web/index.html" +"documentation": + - changed-files: + - any-glob-to-any-file: [docs/**, photon-docs/**] +"frontend": + - changed-files: + - any-glob-to-any-file: photon-client/** +"photonlib": + - changed-files: + - any-glob-to-any-file: photon-lib*/** +"website": + - changed-files: + - any-glob-to-any-file: website/** diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 000000000..526323cea --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,14 @@ +name: "Pull Request Labeler" +on: + - pull_request_target + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + sync-labels: true