Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/prompts/bug-report-review.prompt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
messages:
- role: system
content: |
You are a triage assistant for the GitHub MCP Server repository. This is a Model Context Protocol (MCP) server that connects AI tools to GitHub's platform, enabling AI agents to manage repositories, issues, pull requests, workflows, and more.

Your job is to analyze bug reports and assess their completeness.

Analyze the issue for these key elements:
1. Clear description of the problem
2. Affected version (from running `docker run -i --rm ghcr.io/github/github-mcp-server ./github-mcp-server --version`)
3. Steps to reproduce the behavior
4. Expected vs actual behavior
5. Relevant logs (if applicable)

Provide ONE of these assessments:

### AI Assessment: Ready for Review
Use when the bug report has most required information and can be triaged by a maintainer.

### AI Assessment: Missing Details
Use when critical information is missing (no reproduction steps, no version info, unclear problem description).

### AI Assessment: Unsure
Use when you cannot determine the completeness of the report.

After your assessment header, provide a brief explanation of your rating.
If details are missing, note which specific sections need more information.
- role: user
content: "{{input}}"
model: openai/gpt-4o-mini
modelParameters:
max_tokens: 500
28 changes: 28 additions & 0 deletions .github/workflows/ai-issue-assessment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: AI Issue Assessment

on:
issues:
types: [labeled]
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot run this workflow on issues that have label bug and issues that don't have any label

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated workflow to trigger on issues with bug label OR newly opened issues without any labels in 0bfc619.


jobs:
ai-issue-assessment:
if: github.event.label.name == 'triage-pending'
runs-on: ubuntu-latest
permissions:
issues: write
models: read
contents: read

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run AI assessment
uses: github/ai-assessment-comment-labeler@e3bedc38cfffa9179fe4cee8f7ecc93bffb3fee7 # v1.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ github.event.issue.number }}
issue_body: ${{ github.event.issue.body }}
ai_review_label: 'triage-pending'
prompts_directory: '.github/prompts'
labels_to_prompts_mapping: 'bug,bug-report-review.prompt.yml'
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot remove bug-report-review.prompt.yml, this label doesn't exist

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed bug-report-review.prompt.yml and the workflow file in 705ca08.

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't remove bug-report-review.prompt.yml file!!

Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot Don't remove bug-report-review.prompt.yml file!!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Restored bug-report-review.prompt.yml in 0bfc619.

Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

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

The labels_to_prompts_mapping parameter maps 'bug' label to 'bug-report-review.prompt.yml', but the workflow also runs for newly opened issues without any labels (line 10). For unlabeled issues, it's unclear which prompt will be used since there's no 'bug' label to match against.

Consider either:

  1. Adding a default prompt mapping for unlabeled issues
  2. Documenting that unlabeled issues won't be assessed (and updating the workflow condition to only run on labeled bugs)
  3. Verifying that the action handles this case appropriately with a fallback prompt
Suggested change
labels_to_prompts_mapping: 'bug,bug-report-review.prompt.yml'
labels_to_prompts_mapping: 'bug,bug-report-review.prompt.yml;default,default-issue-review.prompt.yml'

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot but default-issue-review.prompt.yml doesn't exist, can you propose how it could look like?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created default-issue-review.prompt.yml in 5e1b41c. It analyzes new issues to determine their type (bug, feature request, question, etc.) and assesses whether they have enough information for maintainers to act on.