cli/.github/workflows/triage-pull-requests.yml
Kynan Ware e90343db35 Migrate PR triage workflows to shared workflows
Replace prauto.yml and pr-help-wanted.yml with a single
triage-pull-requests.yml that calls shared reusable workflows from
desktop/gh-cli-and-desktop-shared-workflows:

- triage-label-external-pr: labels external PRs with external,needs-triage
- triage-close-from-default-branch: closes PRs opened from trunk
- triage-pr-requirements: enforces body length + help-wanted issue linkage
- triage-close-no-help-wanted: closes PRs labeled no-help-wanted-issue
- triage-ready-for-review: removes needs-triage on ready-for-review label

Also adds a daily schedule to auto-close PRs with unmet requirements
after 7 days.

Deletes:
- prauto.yml
- pr-help-wanted.yml
- scripts/check-help-wanted.sh

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-17 07:57:52 -07:00

59 lines
2 KiB
YAML

name: PR Triaging
on:
pull_request_target:
types: [opened, reopened, edited, labeled, ready_for_review]
schedule:
- cron: '0 4 * * *' # Daily at 4 AM UTC — close unmet-requirements PRs
jobs:
label-external:
if: >-
github.event_name == 'pull_request_target' &&
(github.event.action == 'opened' || github.event.action == 'reopened')
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-label-external-pr.yml@main
permissions:
issues: write
pull-requests: write
repository-projects: read
close-from-default-branch:
if: >-
github.event_name == 'pull_request_target' &&
github.event.action == 'opened'
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-close-from-default-branch.yml@main
with:
default_branch: trunk
permissions:
pull-requests: write
check-requirements:
if: >-
github.event_name == 'pull_request_target' &&
(github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'edited')
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-pr-requirements.yml@main
permissions:
issues: read
pull-requests: write
close-unmet-requirements:
if: github.event_name == 'schedule'
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-pr-requirements.yml@main
permissions:
issues: read
pull-requests: write
close-no-help-wanted:
if: >-
github.event_name == 'pull_request_target' &&
github.event.action == 'labeled'
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-close-no-help-wanted.yml@main
permissions:
pull-requests: write
ready-for-review:
if: >-
github.event_name == 'pull_request_target' &&
github.event.action == 'labeled'
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-ready-for-review.yml@main
permissions:
pull-requests: write