From 86ee66a92d9187ab7e1144007d72039b9fdc1cf3 Mon Sep 17 00:00:00 2001 From: Eric Sethna <14333569+esethna@users.noreply.github.com> Date: Wed, 23 Sep 2026 09:01:23 -0700 Subject: [PATCH] Add workflow to auto-label docs PRs for editor review (#38717) * Add workflow to auto-label docs PRs for editor review Apply the existing "2: Editor Review" label when non-draft, same-repo PRs change files under docs/, so technical writers are notified without relying on the disabled docs impact review workflow. Co-authored-by: Cursor * Update .github/workflows/docs-editor-review-label.yml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update .github/workflows/docs-editor-review-label.yml Co-authored-by: Eva Sarafianou --------- Co-authored-by: Cursor Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Eva Sarafianou --- .../workflows/docs-editor-review-label.yml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/docs-editor-review-label.yml diff --git a/.github/workflows/docs-editor-review-label.yml b/.github/workflows/docs-editor-review-label.yml new file mode 100644 index 00000000000..76215435f8b --- /dev/null +++ b/.github/workflows/docs-editor-review-label.yml @@ -0,0 +1,34 @@ +name: Docs Editor Review Label + +# Auto-apply "2: Editor Review" when a non-draft PR changes docs/**. +# API OpenAPI changes are intentionally excluded; drafts are skipped until ready_for_review. +on: + pull_request: + types: [opened, reopened, synchronize, ready_for_review] + paths: + - "docs/**" + - "!docs/site/**" + - "!docs/vendor/**" + + +permissions: {} + +concurrency: + group: docs-editor-review-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + label: + if: | + github.event.pull_request.draft == false + && github.event.pull_request.head.repo.full_name == github.repository + permissions: + pull-requests: write + runs-on: ubuntu-24.04 + steps: + - name: Add Editor Review label + env: + GH_TOKEN: ${{ github.token }} + PR_NUMBER: ${{ github.event.pull_request.number }} + run: | + gh pr edit "$PR_NUMBER" --repo "${{ github.repository }}" --add-label "2: Editor Review"