Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 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'
- '.stylelintignore'
- '.prettierrc.json'
- '.prettierignore'
- '.lintstagedrc'
- '.gitignore'
- '.husky/**'
Comment thread
ryzrr marked this conversation as resolved.

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'
28 changes: 28 additions & 0 deletions .github/workflows/pull-request-label.yml
Original file line number Diff line number Diff line change
@@ -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-slim
permissions:
contents: read
pull-requests: write
issues: write

steps:
- name: Apply labels
uses: actions/labeler@bf12e9b00b37c5c0ca2b87b79b2daf7891dbda13 # v7.0.0
with:
sync-labels: true
Loading