From ffa5e778f75851528dda1ebc1e77965000e612e3 Mon Sep 17 00:00:00 2001 From: Nikhil Kumar Rajak Date: Fri, 7 Aug 2026 20:05:50 +0000 Subject: [PATCH 1/3] feat(ci): label pull requests by changed paths --- .github/labeler.yml | 63 ++++++++++++++++++++++++ .github/workflows/pull-request-label.yml | 28 +++++++++++ 2 files changed, 91 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/pull-request-label.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 00000000..262c4f87 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,63 @@ +# Path -> label rules for .github/workflows/pull-request-label.yml + +documentation: + - changed-files: + - any-glob-to-any-file: + - 'pages/**/*.md' + - '*.md' + +blog: + - changed-files: + - any-glob-to-any-file: + - 'pages/blog/**' + - 'layouts/Blog/**' + - 'layouts/Post/**' + - 'scripts/data/blog.mjs' + - 'scripts/rss-feed/**' + - '.github/workflows/create-blog-post.yml' + +theme: + - changed-files: + - any-glob-to-any-file: + - 'components/**' + - 'layouts/**' + - 'styles/**' + - 'hooks/**' + - 'plugins/theme/**' + - 'public/**' + +tooling: + - changed-files: + - any-glob-to-any-file: + - 'scripts/**' + - 'plugins/processor/**' + - 'plugins/shared/**' + - 'utils/**' + - 'api/**' + - 'eslint-local-rules/**' + - 'versions.json' + - 'vercel.json' + - 'tsconfig.json' + - 'eslint.config.mjs' + - '.stylelintrc.mjs' + - '.prettierrc.json' + - '.lintstagedrc' + - '.husky/**' + +tests: + - changed-files: + - any-glob-to-any-file: + - 'tests/**' + +dependencies: + - changed-files: + - any-glob-to-any-file: + - 'package.json' + - 'package-lock.json' + +github_actions: + - changed-files: + - any-glob-to-any-file: + - '.github/workflows/**' + - '.github/dependabot.yml' + - '.github/labeler.yml' diff --git a/.github/workflows/pull-request-label.yml b/.github/workflows/pull-request-label.yml new file mode 100644 index 00000000..48b1ebf9 --- /dev/null +++ b/.github/workflows/pull-request-label.yml @@ -0,0 +1,28 @@ +# Labels PRs by the paths they touch. Rules: .github/labeler.yml +name: Pull Request Label + +on: + pull_request_target: # zizmor: ignore[dangerous-triggers] + types: [opened, reopened, synchronize] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + label: + name: Label Pull Request + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + issues: write + + steps: + - name: Apply labels + uses: actions/labeler@bf12e9b00b37c5c0ca2b87b79b2daf7891dbda13 # v7.0.0 + with: + sync-labels: true From ccb80d98f1963644d8c08ea8d9efb72b6a0ad977 Mon Sep 17 00:00:00 2001 From: Nikhil Kumar Rajak <145889151+ryzrr@users.noreply.github.com> Date: Sat, 8 Aug 2026 15:50:17 +0530 Subject: [PATCH 2/3] Update .github/labeler.yml Co-authored-by: Mohamed Shams El-Deen <68347231+moshams272@users.noreply.github.com> --- .github/labeler.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/labeler.yml b/.github/labeler.yml index 262c4f87..c3e18926 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -40,8 +40,11 @@ tooling: - 'tsconfig.json' - 'eslint.config.mjs' - '.stylelintrc.mjs' + - '.stylelintignore' - '.prettierrc.json' + - '.prettierignore' - '.lintstagedrc' + - '.gitignore' - '.husky/**' tests: From b89ab7d805dca7a29542755b25b8c6df33ff679d Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Sat, 8 Aug 2026 08:13:21 -0400 Subject: [PATCH 3/3] Update pull-request-label.yml --- .github/workflows/pull-request-label.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-label.yml b/.github/workflows/pull-request-label.yml index 48b1ebf9..f7ede63b 100644 --- a/.github/workflows/pull-request-label.yml +++ b/.github/workflows/pull-request-label.yml @@ -15,7 +15,7 @@ permissions: jobs: label: name: Label Pull Request - runs-on: ubuntu-latest + runs-on: ubuntu-slim permissions: contents: read pull-requests: write