diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..bf8b54479 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,46 @@ +area/docs: + - changed-files: + - any-glob-to-any-file: + - "docs/**" + - "versioned_docs/**" + - "versioned_sidebars/**" + - "tutorials/**" + - "sidebars.js" + - "sidebars-tutorials.js" + - "versions.json" + +area/ui: + - changed-files: + - any-glob-to-any-file: "src/**" + +area/blog: + - changed-files: + - any-glob-to-any-file: "blog/**" + +area/i18n: + - changed-files: + - any-glob-to-any-file: "i18n/**" + +area/edge-functions: + - changed-files: + - any-glob-to-any-file: + - "netlify/**" + - "netlify.toml" + +area/ci-infra: + - changed-files: + - any-glob-to-any-file: + - ".github/**" + - "scripts/**" + - "package.json" + - "package-lock.json" + - ".markdownlint.json" + - ".prettierrc" + - ".prettierignore" + +area/seo: + - changed-files: + - any-glob-to-any-file: + - "static/robots.txt" + - "static/llms.txt" + - "docusaurus.config.js" diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml new file mode 100644 index 000000000..b5108b4d8 --- /dev/null +++ b/.github/workflows/pr-labeler.yml @@ -0,0 +1,22 @@ +name: PR Labeler + +# pull_request_target is used so that pull requests opened from forks get +# labeled too. A pull_request run from a fork has a read-only token and cannot +# add labels. This workflow never checks out or executes pull request code, it +# only reads the changed file list, so the elevated token is not exposed to it. +on: + pull_request_target: + types: [opened, synchronize, reopened] + +permissions: + contents: read + pull-requests: write + +jobs: + label: + name: Label by changed paths + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@bf12e9b00b37c5c0ca2b87b79b2daf7891dbda13 # v7.0.0 + with: + sync-labels: false