Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 29, 2025

Adds the issue-triage skill from PureWeen#9 to help triage open GitHub issues that need milestones, labels, or investigation.

Changes

  • .github/skills/issue-triage/SKILL.md - Skill definition with workflow, trigger phrases, and milestone suggestion logic
  • scripts/init-triage-session.ps1 - Initializes session with current milestones and labels from dotnet/maui
  • scripts/query-issues.ps1 - Queries open issues with platform/area/age filters, fetches linked PRs, suggests milestones dynamically
  • scripts/record-triage.ps1 - Tracks triaged issues in session file
  • .github/copilot-instructions.md - Added "Reusable Skills" section documenting the new skill

Dynamic Milestone Detection

Milestones are queried dynamically from dotnet/maui rather than being hardcoded (since SR milestones change monthly):

  • SR milestones: Identified by pattern \.NET.*SR\d+, sorted by due date to determine current/next SR
  • Servicing milestone: Identified by pattern \.NET.*Servicing
  • Suggestions use the dynamically discovered milestones based on issue characteristics (regressions → current SR, PRs → Servicing, etc.)

Usage

# Initialize triage session
pwsh .github/skills/issue-triage/scripts/init-triage-session.ps1

# Query Android issues needing triage
pwsh .github/skills/issue-triage/scripts/query-issues.ps1 -Platform android -Limit 20

# Record a triage decision
pwsh .github/skills/issue-triage/scripts/record-triage.ps1 -IssueNumber 33272 -Milestone "Backlog"

Trigger phrases: "find issues to triage", "triage Android issues", "what issues need attention"

Original prompt

Create a PR for an issue-triage skill that uses the skill from here PureWeen#9. Just grab the issue-triage skill from this PR please


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add issue triage skill from maui PR Add issue-triage skill from PureWeen/maui PR #9 Dec 29, 2025
Copilot AI requested a review from PureWeen December 29, 2025 20:49
Copy link
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot we don't want to hard code SR3, SR4 and servicing. SR3 and SR4 will change every month we have a new milestone every month so you'll need to just query current milestones to know what milestone to suggest for issues, these values can't be hardcoded

Copy link
Contributor Author

Copilot AI commented Dec 29, 2025

@copilot we don't want to hard code SR3, SR4 and servicing. SR3 and SR4 will change every month we have a new milestone every month so you'll need to just query current milestones to know what milesto...

Updated in 643b230. The milestone suggestion logic now queries current milestones dynamically from dotnet/maui using gh api repos/dotnet/maui/milestones. SR milestones are identified by the pattern \.NET.*SR\d+ and sorted by due date to determine current/next SR. The Servicing milestone is identified by \.NET.*Servicing. No more hardcoded milestone names.

Copilot AI requested a review from PureWeen December 29, 2025 21:12
@PureWeen PureWeen marked this pull request as ready for review January 6, 2026 14:31
Copilot AI review requested due to automatic review settings January 6, 2026 14:31
jfversluis
jfversluis previously approved these changes Jan 6, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an issue-triage skill from PureWeen/maui PR #9 to help triage open GitHub issues that need milestones, labels, or investigation. The skill provides three PowerShell scripts that work together to initialize triage sessions, query untriaged issues with intelligent filtering, and track triage decisions. The milestone suggestion logic dynamically queries current milestones from the dotnet/maui repository to avoid hardcoding service release (SR) milestones that change monthly.

Key Changes

  • Skill definition: Provides workflow documentation, trigger phrases, and milestone suggestion logic for the issue triage process
  • PowerShell scripts: Three scripts for initializing sessions, querying issues with filters, and recording triage decisions
  • Copilot integration: Adds the skill to the Reusable Skills section in Copilot instructions for direct invocation or use by agents

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
.github/skills/issue-triage/SKILL.md Documents the triage workflow, milestone suggestion logic, script parameters, and usage examples for the issue-triage skill
.github/skills/issue-triage/scripts/init-triage-session.ps1 Initializes triage sessions by fetching current milestones and labels from dotnet/maui, creating a session tracker file
.github/skills/issue-triage/scripts/query-issues.ps1 Queries open issues needing triage with platform/area/age filters, fetches linked PRs via GraphQL, suggests milestones dynamically
.github/skills/issue-triage/scripts/record-triage.ps1 Records triage decisions (milestone, labels) to the session tracker and updates statistics
.github/copilot-instructions.md Adds "Reusable Skills" section documenting the issue-triage skill with trigger phrases and script references

"android" = "platform/android 🤖"
"ios" = "platform/iOS 🍎"
"windows" = "platform/windows 🪟"
"maccatalyst" = "platform/macOS 🍏"
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The platform label for macOS appears to use "macOS" emoji (🍏) rather than "macCatalyst" to match the ValidateSet parameter value "maccatalyst". This could cause confusion since the parameter is "maccatalyst" but the label mapping key and display text suggest "macOS". Consider whether this should be "macCatalyst" consistently or if there's a specific reason for the naming difference.

Suggested change
"maccatalyst" = "platform/macOS 🍏"
"maccatalyst" = "platform/macCatalyst 🍏"

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The label platform/macOS 🍏 is the actual label name in dotnet/maui. Changing it to platform/macCatalyst 🍏 would break the script since that label doesn't exist in the repo. The parameter is maccatalyst for user convenience, but it correctly maps to the actual GitHub label.

}

$labelNames = ($issue.labels | ForEach-Object { $_.name }) -join ", "
$platformLabel = ($issue.labels | Where-Object { $_.name -like "platform/*" } | Select-Object -First 1)?.name ?? "unknown"
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conditional access operator syntax '?.name' is not supported in PowerShell 5.1 (the default on Windows). This syntax was introduced in PowerShell 7.0. If this script needs to run on systems with PowerShell 5.1, this will cause a syntax error. Consider using a more compatible approach like checking if the property exists before accessing it, or document that PowerShell 7+ is required.

Copilot uses AI. Check for mistakes.
# Update stats
switch -Regex ($Milestone) {
"Backlog" { $session.Stats.Backlog++ }
"Servicing" { $session.Stats.Servicing++ }
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex pattern in the switch statement will match "Servicing" anywhere in the milestone name because it lacks anchors. For example, a milestone named "Pre-Servicing" would incorrectly increment the Servicing counter. Consider using a more specific pattern like '^.*Servicing$' or checking for exact match if "Servicing" should only match milestones ending with that word.

Suggested change
"Servicing" { $session.Stats.Servicing++ }
"^Servicing$" { $session.Stats.Servicing++ }

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggested fix ^Servicing$ would break the script - actual milestones are named .NET 10 Servicing, not just Servicing. The current pattern works correctly for dotnet/maui's established milestone naming conventions which are stable.

Comment on lines +336 to +341
$linkedPRs += [PSCustomObject]@{
Number = $pr.number
Title = $pr.title
State = $pr.state
URL = $pr.url
Milestone = $pr.milestone?.title ?? ""
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conditional access operator syntax '?.name' and '?.title' is not supported in PowerShell 5.1. This will cause syntax errors on systems running the default Windows PowerShell version. Consider using null checks with if statements or document that PowerShell 7+ is required.

Suggested change
$linkedPRs += [PSCustomObject]@{
Number = $pr.number
Title = $pr.title
State = $pr.state
URL = $pr.url
Milestone = $pr.milestone?.title ?? ""
$milestoneTitle = ""
if ($pr.milestone -and $pr.milestone.title) {
$milestoneTitle = $pr.milestone.title
}
$linkedPRs += [PSCustomObject]@{
Number = $pr.number
Title = $pr.title
State = $pr.state
URL = $pr.url
Milestone = $milestoneTitle

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above - these scripts require PowerShell 7+ via the shebang. The ?. operator is intentionally used.

@@ -0,0 +1,116 @@
#!/usr/bin/env pwsh
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shebang line has incorrect spacing. PowerShell shebangs should be '#!/usr/bin/env pwsh' without extra spaces. The current format with spaces after '#' may not be recognized correctly by some systems.

Copilot uses AI. Check for mistakes.
Comment on lines +171 to +177
Stats = @{
Total = 0
Backlog = 0
Servicing = 0
SR = 0
Skipped = 0
}
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Stats object is accessed as a hashtable with '@{}' syntax but accessed with dot notation later. PowerShell PSCustomObject properties should use consistent syntax. Consider using a PSCustomObject instead of a hashtable for the Stats property to match how it's accessed elsewhere, or ensure consistent bracket notation access.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PowerShell hashtables support dot notation access, so this works correctly. While using [PSCustomObject] would be more consistent stylistically, the current code functions as expected.

@@ -0,0 +1,203 @@
#!/usr/bin/env pwsh
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shebang line has incorrect spacing. PowerShell shebangs should be '#!/usr/bin/env pwsh' without extra spaces. The current format with spaces after '#' may not be recognized correctly by some systems.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,588 @@
#!/usr/bin/env pwsh
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shebang line has incorrect spacing. PowerShell shebangs should be '#!/usr/bin/env pwsh' without extra spaces. The current format with spaces after '#' may not be recognized correctly by some systems.

Copilot uses AI. Check for mistakes.
@PureWeen
Copy link
Member

PureWeen commented Jan 8, 2026

/rebase

Copilot AI and others added 4 commits January 8, 2026 14:59
Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
…vicing values

Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
@github-actions github-actions bot force-pushed the copilot/add-issue-triage-skill branch from 643b230 to b77e761 Compare January 8, 2026 14:59
@PureWeen PureWeen merged commit 63761c7 into main Jan 9, 2026
7 of 8 checks passed
@PureWeen PureWeen deleted the copilot/add-issue-triage-skill branch January 9, 2026 21:55
kubaflo pushed a commit to kubaflo/maui that referenced this pull request Jan 16, 2026
Adds the issue-triage skill from PureWeen#9
to help triage open GitHub issues that need milestones, labels, or
investigation.

## Changes

- **`.github/skills/issue-triage/SKILL.md`** - Skill definition with
workflow, trigger phrases, and milestone suggestion logic
- **`scripts/init-triage-session.ps1`** - Initializes session with
current milestones and labels from dotnet/maui
- **`scripts/query-issues.ps1`** - Queries open issues with
platform/area/age filters, fetches linked PRs, suggests milestones
dynamically
- **`scripts/record-triage.ps1`** - Tracks triaged issues in session
file
- **`.github/copilot-instructions.md`** - Added "Reusable Skills"
section documenting the new skill

## Dynamic Milestone Detection

Milestones are queried dynamically from dotnet/maui rather than being
hardcoded (since SR milestones change monthly):
- **SR milestones**: Identified by pattern `\.NET.*SR\d+`, sorted by due
date to determine current/next SR
- **Servicing milestone**: Identified by pattern `\.NET.*Servicing`
- Suggestions use the dynamically discovered milestones based on issue
characteristics (regressions → current SR, PRs → Servicing, etc.)

## Usage

```bash
# Initialize triage session
pwsh .github/skills/issue-triage/scripts/init-triage-session.ps1

# Query Android issues needing triage
pwsh .github/skills/issue-triage/scripts/query-issues.ps1 -Platform android -Limit 20

# Record a triage decision
pwsh .github/skills/issue-triage/scripts/record-triage.ps1 -IssueNumber 33272 -Milestone "Backlog"
```

Trigger phrases: "find issues to triage", "triage Android issues", "what
issues need attention"

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Create a PR for an issue-triage skill that uses the skill from here
PureWeen#9. Just grab the issue-triage
skill from this PR please


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/dotnet/maui/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants