Skip to content

Commit eeb54f2

Browse files
CopilotPureWeenkubaflo
authored
Add find-reviewable-pr skill from existing PR (dotnet#33349)
Adds the `find-reviewable-pr` skill from <a href="https://github.com/PureWeen/maui/pull/9">PureWeen/maui PR dotnet#9</a> to help find open PRs in the dotnet/maui and dotnet/docs-maui repositories that are good candidates for review. ## Changes Made - **`.github/skills/find-reviewable-pr/SKILL.md`** - Skill documentation including usage guide, priority categories, script parameters, and workflow for reviewing PRs - **`.github/skills/find-reviewable-pr/scripts/query-reviewable-prs.ps1`** - PowerShell script that queries GitHub for open PRs and prioritizes them dynamically by milestone (lower SR numbers first), P/0 priority, partner status, community contributions, and recency ## Features The skill provides: - Priority-based PR categorization (P/0, Milestoned, Partner, Community, Recent) - **Dynamic milestone sorting**: Milestones are sorted by SR number (e.g., SR5 before SR6) so prioritization remains correct as milestones advance monthly - Platform filtering (Android, iOS, Windows, MacCatalyst) - Multiple output formats (review, table, JSON) - Complexity assessment for PRs - Review status tracking - **docs-maui support**: Returns 5 priority PRs and 5 recent PRs from dotnet/docs-maui by default - New `-DocsLimit` parameter to control docs-maui PR count - New `-Category docs-maui` filter option to show only docs-maui PRs - **Recent PRs**: Shows 5 recent PRs from both maui and docs-maui by default - New `-RecentLimit` parameter to control recent PRs from maui (default: 5) <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > Create a PR that just grabs the find-reviewable-pr's skill from this PR PureWeen#9 </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com> Co-authored-by: Shane Neuville <shneuvil@microsoft.com> Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
1 parent 2ba9121 commit eeb54f2

File tree

2 files changed

+992
-0
lines changed

2 files changed

+992
-0
lines changed
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
---
2+
name: find-reviewable-pr
3+
description: Finds open PRs in the dotnet/maui and dotnet/docs-maui repositories that are good candidates for review, prioritizing by milestone, priority labels, partner/community status.
4+
metadata:
5+
author: dotnet-maui
6+
version: "2.1"
7+
compatibility: Requires GitHub CLI (gh) authenticated with access to dotnet/maui and dotnet/docs-maui repositories.
8+
---
9+
10+
# Find Reviewable PR
11+
12+
This skill searches the dotnet/maui and dotnet/docs-maui repositories for open pull requests that are good candidates for review, prioritized by importance.
13+
14+
## When to Use
15+
16+
- "Find a PR to review"
17+
- "Find PRs that need review"
18+
- "Show me milestoned PRs"
19+
- "Find partner PRs to review"
20+
- "What community PRs are open?"
21+
- "Find docs-maui PRs to review"
22+
23+
## Priority Categories (in order)
24+
25+
1. **Priority (P/0)** - Critical priority PRs that need immediate attention
26+
2. **Milestoned** - PRs assigned to current milestone(s), sorted by lowest SR number first (e.g., SR5 before SR6), then Servicing
27+
3. **Partner** - PRs from Syncfusion and other partners
28+
4. **Community** - External contributions needing review
29+
5. **Recent Waiting for Review** - PRs created in last 2 weeks that need review (minimum 5)
30+
6. **docs-maui Waiting for Review** - Documentation PRs needing review (minimum 5)
31+
32+
## Quick Start
33+
34+
```bash
35+
# Find all reviewable PRs (shows top from each category including docs-maui)
36+
pwsh .github/skills/find-reviewable-pr/scripts/query-reviewable-prs.ps1
37+
38+
# Find only milestoned PRs
39+
pwsh .github/skills/find-reviewable-pr/scripts/query-reviewable-prs.ps1 -Category milestoned
40+
41+
# Find only docs-maui PRs waiting for review
42+
pwsh .github/skills/find-reviewable-pr/scripts/query-reviewable-prs.ps1 -Category docs-maui
43+
44+
# Find recent PRs waiting for review
45+
pwsh .github/skills/find-reviewable-pr/scripts/query-reviewable-prs.ps1 -Category recent
46+
47+
# Find Android PRs only
48+
pwsh .github/skills/find-reviewable-pr/scripts/query-reviewable-prs.ps1 -Platform android
49+
50+
# Limit results per category
51+
pwsh .github/skills/find-reviewable-pr/scripts/query-reviewable-prs.ps1 -Limit 5
52+
53+
# Adjust docs-maui limit (default is 5, minimum enforced)
54+
pwsh .github/skills/find-reviewable-pr/scripts/query-reviewable-prs.ps1 -DocsLimit 10
55+
```
56+
57+
## Script Parameters
58+
59+
| Parameter | Values | Default | Description |
60+
|-----------|--------|---------|-------------|
61+
| `-Category` | milestoned, priority, recent, partner, community, docs-maui, all | all | Filter by category |
62+
| `-Platform` | android, ios, windows, maccatalyst, all | all | Filter by platform |
63+
| `-Limit` | 1-100 | 10 | Max PRs per category (maui repo) |
64+
| `-RecentLimit` | 1-100 | 5 | Max recent PRs waiting for review from maui repo (minimum 5 enforced) |
65+
| `-DocsLimit` | 1-100 | 5 | Max PRs for docs-maui waiting for review (minimum 5 enforced) |
66+
| `-ExcludeAuthors` | string[] | (none) | Exclude PRs from specific authors (e.g., `-ExcludeAuthors PureWeen,rmarinho`) |
67+
| `-IncludeAuthors` | string[] | (none) | Only include PRs from specific authors |
68+
| `-OutputFormat` | review, table, json | review | Output format |
69+
70+
## Workflow for Reviewing PRs
71+
72+
### Step 1: Find PRs to Review
73+
74+
**CRITICAL**: You MUST use the PowerShell script below. Do NOT attempt to query GitHub directly with `gh` commands or `jq` if the script fails. The script contains important prioritization logic (SR3 before SR4, P/0 first, etc.) that cannot be replicated with ad-hoc queries.
75+
76+
```bash
77+
pwsh .github/skills/find-reviewable-pr/scripts/query-reviewable-prs.ps1 -Limit 5
78+
```
79+
80+
**If the script fails** (e.g., HTTP 502, network error, authentication issue):
81+
1. **STOP** - Do not attempt fallback queries
82+
2. **Report the error** to the user
83+
3. **Suggest retry** - Ask user to try again in a few minutes (GitHub API may be temporarily unavailable)
84+
85+
**Why no fallbacks?** Ad-hoc queries bypass the milestone prioritization logic and will return incorrectly ordered results (e.g., later SR milestones before earlier ones).
86+
87+
### Step 2: Check for Warnings
88+
89+
**IMPORTANT**: If the script output contains a warning about missing `read:project` scope, you MUST include this warning at the TOP of your response to the user:
90+
91+
```
92+
⚠️ **Note**: Your GitHub token is missing the `read:project` scope. Project board data is not available.
93+
To enable: `gh auth refresh -s read:project`
94+
```
95+
96+
### Step 3: Present Results from ALL Categories
97+
98+
**CRITICAL**: When presenting PR results, you MUST include PRs from ALL categories returned by the script:
99+
100+
1. 🔴 **Priority (P/0)** - Always include if present
101+
2. 📅 **Milestoned** - Always include if present
102+
3. 🤝 **Partner** - Always include if present
103+
4.**Community** - Always include if present
104+
5. 🕐 **Recent** - Always include if present
105+
6. 📖 **docs-maui** - Always include if present
106+
107+
**DO NOT** omit any category. Each category table should include columns for: PR, Title, Author, Platform/Repo, Status, Age, Updated.
108+
109+
### Step 4: Present ONE PR at a Time for Review
110+
111+
When user asks to review, present only ONE PR in this format:
112+
113+
```markdown
114+
## PR #XXXXX
115+
116+
**[Title]**
117+
118+
🔗 [URL]
119+
120+
| Field | Value |
121+
|-------|-------|
122+
| **Author** | username |
123+
| **Platform** | platform |
124+
| **Complexity** | Easy/Medium/Complex |
125+
| **Milestone** | milestone or (none) |
126+
| **Age** | X days |
127+
| **Files** | X (+additions/-deletions) |
128+
| **Labels** | labels |
129+
| **Category** | priority/milestoned/partner/community/recent |
130+
131+
Would you like me to review this PR?
132+
```
133+
134+
### Step 5: Invoke PR Reviewer
135+
136+
When user confirms, use the **pr-reviewer** agent:
137+
- "Review PR #XXXXX"
138+
139+
## Complexity Levels
140+
141+
| Complexity | Criteria |
142+
|------------|----------|
143+
| **Easy** | ≤5 files, ≤200 additions |
144+
| **Medium** | 6-15 files, or 200-500 additions |
145+
| **Complex** | >15 files, or >500 additions |
146+
147+
## Tips
148+
149+
- **P/0 PRs** should be reviewed first - they're blocking releases
150+
- **Milestoned PRs** have deadlines and should be prioritized
151+
- **Partner PRs** often have business priority
152+
- **Community PRs** may need more guidance and thorough review
153+
- **Recent PRs** - quick turnaround keeps contributors engaged

0 commit comments

Comments
 (0)