Skip to content

Commit e90343d

Browse files
BagToadCopilot
andcommitted
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>
1 parent f28380b commit e90343d

4 files changed

Lines changed: 59 additions & 226 deletions

File tree

.github/workflows/pr-help-wanted.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/prauto.yml

Lines changed: 0 additions & 75 deletions
This file was deleted.

.github/workflows/scripts/check-help-wanted.sh

Lines changed: 0 additions & 105 deletions
This file was deleted.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: PR Triaging
2+
on:
3+
pull_request_target:
4+
types: [opened, reopened, edited, labeled, ready_for_review]
5+
schedule:
6+
- cron: '0 4 * * *' # Daily at 4 AM UTC — close unmet-requirements PRs
7+
8+
jobs:
9+
label-external:
10+
if: >-
11+
github.event_name == 'pull_request_target' &&
12+
(github.event.action == 'opened' || github.event.action == 'reopened')
13+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-label-external-pr.yml@main
14+
permissions:
15+
issues: write
16+
pull-requests: write
17+
repository-projects: read
18+
19+
close-from-default-branch:
20+
if: >-
21+
github.event_name == 'pull_request_target' &&
22+
github.event.action == 'opened'
23+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-close-from-default-branch.yml@main
24+
with:
25+
default_branch: trunk
26+
permissions:
27+
pull-requests: write
28+
29+
check-requirements:
30+
if: >-
31+
github.event_name == 'pull_request_target' &&
32+
(github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'edited')
33+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-pr-requirements.yml@main
34+
permissions:
35+
issues: read
36+
pull-requests: write
37+
38+
close-unmet-requirements:
39+
if: github.event_name == 'schedule'
40+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-pr-requirements.yml@main
41+
permissions:
42+
issues: read
43+
pull-requests: write
44+
45+
close-no-help-wanted:
46+
if: >-
47+
github.event_name == 'pull_request_target' &&
48+
github.event.action == 'labeled'
49+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-close-no-help-wanted.yml@main
50+
permissions:
51+
pull-requests: write
52+
53+
ready-for-review:
54+
if: >-
55+
github.event_name == 'pull_request_target' &&
56+
github.event.action == 'labeled'
57+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-ready-for-review.yml@main
58+
permissions:
59+
pull-requests: write

0 commit comments

Comments
 (0)