Skip to content

Commit 4da3fc5

Browse files
authored
Merge pull request cli#12707 from cli/kw/use-shared-pr-workflows
Migrate PR triage workflows to shared workflows
2 parents f28380b + e90343d commit 4da3fc5

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)