Skip to content

feat: Copilot issue triage with YAML templates#152

Merged
seanthimons merged 1 commit intomainfrom
feature/copilot-issue-triage
Mar 12, 2026
Merged

feat: Copilot issue triage with YAML templates#152
seanthimons merged 1 commit intomainfrom
feature/copilot-issue-triage

Conversation

@seanthimons
Copy link
Owner

Summary

  • Converted all 3 issue templates (bug, feature, question) from markdown to YAML form format with structured input fields
  • Every template auto-applies the copilot label so new issues are flagged for triage
  • Added .github/copilot-instructions.md with full triage instructions: label taxonomy (complexity/impact/priority), milestone mapping (v12-v17), and duplicate detection guidance
  • Added copilot-triage.yml GitHub Action that triggers on new issues with the copilot label, invoking Copilot to label, assign milestones, and comment reasoning
  • Added config.yml template chooser with blank issue escape hatch and link to TODO.md

How it works

  1. User creates an issue via any template → copilot label is auto-applied
  2. GitHub Action fires on issues: [opened] when copilot label is present
  3. Action comments @copilot with triage instructions referencing copilot-instructions.md
  4. Copilot reads the instructions, applies labels, assigns milestone, comments reasoning, and removes the copilot label

Test plan

  • Create a test bug report issue and verify YAML form renders correctly
  • Verify copilot label is auto-applied on issue creation
  • Verify the GitHub Action triggers and comments the triage prompt
  • Verify Copilot responds with label + milestone assignment
  • Verify blank issue option is available in template chooser

Convert markdown issue templates to YAML forms with structured fields.
Add copilot label to all templates so new issues trigger automatic triage.
Create copilot-instructions.md with label taxonomy and milestone mapping.
Add GitHub Action workflow that invokes Copilot to label, assign milestone,
and comment triage reasoning on new issues.
Copilot AI review requested due to automatic review settings March 12, 2026 19:26
Copy link

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 introduces a Copilot-driven issue triage flow by migrating issue templates to GitHub YAML Issue Forms, automatically flagging new issues with a copilot label, and adding automation/instructions to prompt Copilot to apply triage labels and milestones.

Changes:

  • Replaced the bug/feature/question issue templates with YAML Issue Forms and auto-applied the copilot label.
  • Added a new copilot-triage GitHub Action to comment a triage prompt on newly opened issues labeled copilot.
  • Added .github/copilot-instructions.md and a template chooser config.yml with a TODO.md link and blank-issue option.

Reviewed changes

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

Show a summary per file
File Description
.github/workflows/copilot-triage.yml New workflow that triggers on issue open (when labeled copilot) and posts a Copilot triage prompt comment.
.github/copilot-instructions.md Triage playbook defining label taxonomy, milestone mapping, and duplicate-detection guidance.
.github/ISSUE_TEMPLATE/bug_report.yml New YAML bug-report form; auto-applies bug + copilot.
.github/ISSUE_TEMPLATE/feature_request.yml New YAML feature-request form; auto-applies enhancement + copilot.
.github/ISSUE_TEMPLATE/question.yml New YAML question/discussion form; auto-applies question + copilot.
.github/ISSUE_TEMPLATE/config.yml Template chooser config enabling blank issues and linking to TODO.md.
.github/ISSUE_TEMPLATE/bug_report.md Removed old Markdown template (replaced by YAML form).
.github/ISSUE_TEMPLATE/feature_request.md Removed old Markdown template (replaced by YAML form).
.github/ISSUE_TEMPLATE/question.md Removed old Markdown template (replaced by YAML form).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +7 to +18
permissions:
issues: write
contents: read

jobs:
triage:
# Only run on issues tagged with 'copilot' (set by issue templates)
if: contains(github.event.issue.labels.*.name, 'copilot')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

actions/checkout isn’t used by this workflow (it only posts a comment). Dropping the checkout step would reduce runtime, and then you can also remove permissions: contents: read to keep the token scope minimal.

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +30
- name: Assign Copilot to triage
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.issue.number }}
body: |
@copilot Please triage this issue following the instructions in `.github/copilot-instructions.md`:

1. **Label it** with appropriate `complexity:*`, `impact:*`, and `priority:*` labels
2. **Assign it** to the correct milestone (v12.0 through v17.0) based on its domain
3. **Comment** with your triage reasoning
4. **Remove** the `copilot` label when done

Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

This will create a new comment every time the workflow is re-run, repeatedly mentioning @copilot and potentially triggering multiple triage runs. Consider making the comment idempotent (e.g., add a hidden marker in the body and use a find+update pattern) and/or add a concurrency key scoped to the issue number.

Copilot uses AI. Check for mistakes.
with:
issue-number: ${{ github.event.issue.number }}
body: |
@copilot Please triage this issue following the instructions in `.github/copilot-instructions.md`:
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

The prompt references .github/copilot-instructions.md as inline code, which isn’t a clickable link in the issue comment UI. Consider linking to the file (relative link or full GitHub URL) so Copilot/humans can open it directly from the triage comment.

Suggested change
@copilot Please triage this issue following the instructions in `.github/copilot-instructions.md`:
@copilot Please triage this issue following the instructions in [.github/copilot-instructions.md](.github/copilot-instructions.md):

Copilot uses AI. Check for mistakes.
attributes:
label: R Version (if relevant)
placeholder: "e.g., R 4.5.1"

Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

The previous question template collected a “Serapeum Version” value (useful for debugging/versioned behavior). That field was dropped in the YAML form; consider adding an optional serapeum-version input to keep parity and improve triage quality.

Suggested change
- type: input
id: serapeum-version
attributes:
label: Serapeum Version (if relevant)
placeholder: "e.g., 1.2.3"

Copilot uses AI. Check for mistakes.
@seanthimons seanthimons merged commit dc30b66 into main Mar 12, 2026
5 checks passed
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.

2 participants