mirror of
https://github.com/mattermost/mattermost.git
synced 2026-11-03 12:48:37 -06:00
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 <cursoragent@cursor.com> * 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 <eva.sarafianou@gmail.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Eva Sarafianou <eva.sarafianou@gmail.com>
This commit is contained in:
1 file changed
+34
@@ -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"
|
||||
Reference in new issue
Block a user