feat: Copilot issue triage with YAML templates#152
Conversation
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.
There was a problem hiding this comment.
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
copilotlabel. - Added a new
copilot-triageGitHub Action to comment a triage prompt on newly opened issues labeledcopilot. - Added
.github/copilot-instructions.mdand a template chooserconfig.ymlwith 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.
| 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 | ||
|
|
There was a problem hiding this comment.
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.
| - 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 | ||
|
|
There was a problem hiding this comment.
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.
| with: | ||
| issue-number: ${{ github.event.issue.number }} | ||
| body: | | ||
| @copilot Please triage this issue following the instructions in `.github/copilot-instructions.md`: |
There was a problem hiding this comment.
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.
| @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): |
| attributes: | ||
| label: R Version (if relevant) | ||
| placeholder: "e.g., R 4.5.1" | ||
|
|
There was a problem hiding this comment.
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.
| - type: input | |
| id: serapeum-version | |
| attributes: | |
| label: Serapeum Version (if relevant) | |
| placeholder: "e.g., 1.2.3" |
Summary
copilotlabel so new issues are flagged for triage.github/copilot-instructions.mdwith full triage instructions: label taxonomy (complexity/impact/priority), milestone mapping (v12-v17), and duplicate detection guidancecopilot-triage.ymlGitHub Action that triggers on new issues with thecopilotlabel, invoking Copilot to label, assign milestones, and comment reasoningconfig.ymltemplate chooser with blank issue escape hatch and link to TODO.mdHow it works
copilotlabel is auto-appliedissues: [opened]whencopilotlabel is present@copilotwith triage instructions referencingcopilot-instructions.mdcopilotlabelTest plan
copilotlabel is auto-applied on issue creation