When a PR is opened as draft and later marked ready for review, the check-requirements job's if filter excluded the ready_for_review action, so the screening workflow never ran and unmet-requirements was never applied. Add ready_for_review to the action filter so screening runs when a draft PR transitions to requesting review. Companion fix in desktop/gh-cli-and-desktop-shared-workflows updates the called workflow's own filters to handle ready_for_review consistently. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
67 lines
2.2 KiB
YAML
67 lines
2.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' || github.event.action == 'ready_for_review')
|
|
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-pr-requirements.yml@main
|
|
with:
|
|
enable_pr_screening: true
|
|
days_until_close: 4
|
|
large_pr_days_until_close: 2
|
|
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
|
|
with:
|
|
enable_pr_screening: true
|
|
days_until_close: 4
|
|
large_pr_days_until_close: 2
|
|
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
|