Add more nuanced unmet requirements for external PRs#17
Merged
Conversation
Add three new opt-in behaviors to triage-pr-requirements.yml, all gated behind enable_smart_triage: true (existing behavior unchanged by default): - Instant-close spam PRs: zero changed files, empty body (< 50 chars after stripping HTML comments), or all files in configurable irrelevant paths - Detect same-author resubmissions: finds closed PRs from the same author with unmet-requirements in the last 30 days with overlapping files, closes immediately with reference to the original - Fast-track small fixes: routes PRs with ≤ 30 LOC, ≤ 3 files, and a well-written description (≥ 100 chars) to needs-triage instead of auto-closing Based on analysis of 91 external PRs across desktop/desktop and cli/cli that received the unmet-requirements label. The heuristics would have correctly triaged ~80% of those PRs with high confidence. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
A short body alone is not spam — contributors may update the body after opening. The existing requirements check already handles short bodies with a 7-day grace period. Spam detection now only triggers on unambiguous signals: zero changed files or all files in irrelevant paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add accelerated close timer (default 3 days) for large PRs (>200 LOC, >5 files) with no help-wanted issue and no team reviews. Data showed 100% close rate on these across 16 PRs in the analysis. Rework unmet-requirements comments to lead with the specific reason the PR was flagged and collapse the full requirements list into a <details> block for clarity. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The irrelevant-paths check only caught 2 of 91 PRs and both were already covered by the zero-files check or standard requirements flow. Not worth the per-repo configuration burden. Simplify spam detection to a single unambiguous signal: zero changed files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the 'smart_triage' branding (which could imply AI) with names that describe what each input controls: enable_smart_triage → enable_pr_screening smart_triage_max_loc → fast_track_max_loc smart_triage_max_files → fast_track_max_files smart_triage_min_body → fast_track_min_body smart_triage_large_pr_loc → large_pr_min_loc smart_triage_large_pr_files → large_pr_min_files smart_triage_large_pr_days → large_pr_days_until_close Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Small, well-described PRs that pass the fast-track heuristic should go directly to review rather than sitting in a triage queue. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Update workflow description to mention opt-in screening - Add ready-for-review label to pr-requirements in labels table - Add enable_pr_screening to key configurable inputs table Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Scheduler now checks PR size at close time, applying large_pr_days_until_close for large PRs instead of standard deadline - Filter reviews by authorAssociation (MEMBER/OWNER/COLLABORATOR) so external reviews can't bypass large-PR detection - Use $RUNNER_TEMP instead of /tmp for resubmission temp files (safe on self-hosted runners) - Add fast_track_label input (default: ready-for-review) so consumers can customize the label, with || true guard for missing labels Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-in “extended PR screening” mode to the reusable triage-pr-requirements.yml workflow to better handle external PRs (auto-close empty PRs, detect resubmissions, fast-track small fixes, and accelerate closure of large unsolicited PRs), while keeping existing behavior unchanged unless enabled.
Changes:
- Introduces new
workflow_callinputs and screening steps (zero-change close, resubmission detection, small-fix fast-track, large PR path) intriage-pr-requirements.yml. - Updates unmet-requirements/large-PR comment formatting to include a reason-first message with full requirements in a
<details>block. - Documents the opt-in feature in README and adds a commented example configuration.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/triage-pr-requirements.yml |
Adds opt-in screening logic, new inputs, updated commenting, and scheduled close adjustments. |
example-usage/triage-prs.yml |
Adds commented example showing how to enable screening via with: inputs. |
README.md |
Documents the new screening capability and updates labels/inputs tables accordingly. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (1)
.github/workflows/triage-pr-requirements.yml:393
- This comment body is indented inside the quoted string, which will render as a Markdown code block and likely break the intended formatting (including the new
<details>block). Use a heredoc/--body-file(without leading indentation) so the reasons and<details>collapse render properly.
gh pr comment "$NUMBER" --body "Thanks for your pull request! Unfortunately, it doesn't meet the requirements for review:
$REASONS
**Please update your PR to address the above.** This PR will be automatically closed in **$DAYS days** if these requirements are not met.
<details>
<summary>Full contribution requirements</summary>
1. Include a detailed description of what this PR does
2. Link to an issue with the \`${{ inputs.help_wanted_label || 'help wanted' }}\` label (use \`Fixes #123\` or \`Closes #123\`)
</details>"
- Files reviewed: 3/3 changed files
- Comments generated: 2
sergiou87
approved these changes
Apr 29, 2026
tidy-dev
added a commit
to cli/cli
that referenced
this pull request
Apr 29, 2026
Opts in to the new PR screening features in the shared triage workflow: - Instantly closes PRs with zero file changes - Detects same-author resubmissions of recently closed PRs - Fast-tracks small, well-described fixes to ready-for-review - Accelerates closure of large unsolicited PRs (3 days vs 7) Depends on desktop/gh-cli-and-desktop-shared-workflows#17 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Apr 29, 2026
pull Bot
pushed a commit
to h308427/desktop
that referenced
this pull request
May 4, 2026
Opts in to the new PR screening features in the shared triage workflow: - Instantly closes PRs with zero file changes - Detects same-author resubmissions of recently closed PRs - Fast-tracks small, well-described fixes to ready-for-review - Accelerates closure of large unsolicited PRs (3 days vs 7) Depends on desktop/gh-cli-and-desktop-shared-workflows#17 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds opt-in extended PR screening to the
triage-pr-requirements.ymlreusable workflow. Whenenable_pr_screening: trueis set, four new behaviors activate for external PRs:All existing behavior is unchanged when
enable_pr_screeningis not set (default:false).New Inputs
enable_pr_screeningfalsefast_track_max_loc30fast_track_max_files3fast_track_min_body100fast_track_labelready-for-reviewlarge_pr_min_loc200large_pr_min_files5large_pr_days_until_close3Pipeline Order
First match wins — subsequent steps are skipped.
Comment Improvements
<details>blockScheduled Close Enhancements
The
close-unmet-requirementsscheduled job now checks PR size at close time:days_until_close(default 7 days)large_pr_days_until_close(default 3 days)This ensures the accelerated timeline promised in the comment is actually enforced.
Security & Robustness
authorAssociation(MEMBER/OWNER/COLLABORATOR only) — external drive-by reviews can't defeat the accelerated close$RUNNER_TEMPinstead of/tmpto avoid cross-job interference|| trueso a missing label doesn't abort the jobfast_track_labelinput (default:ready-for-review) so consumers can customizeTesting
Tested all 4 paths in
tidy-dev/playgroundwith a workflow referencing this branch:unmet-requirements+ 3-day messageready-for-reviewlabel appliedunmet-requirements+ 7-day messageFiles Changed
.github/workflows/triage-pr-requirements.yml— All new logic + scheduler enhancementexample-usage/triage-prs.yml— Commented example showing opt-in usageREADME.md— Updated workflow description, labels table, and configurable inputs