Skip to content

Commit 7942ea0

Browse files
Copilottonytrg
andcommitted
Migrate PR #1515 changes to modelcontextprotocol/go-sdk
Resolves merge conflicts by migrating the review threads refactoring from mark3labs/mcp-go to modelcontextprotocol/go-sdk: - PullRequestRead now uses getGQLClient for get_review_comments - GetPullRequestReviewComments uses GraphQL to fetch review threads - Added GraphQL types for review threads query - Updated tests and toolsnaps for new SDK patterns Co-authored-by: tonytrg <[email protected]>
1 parent 5fe95c3 commit 7942ea0

File tree

173 files changed

+13271
-8390
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+13271
-8390
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This is the **GitHub MCP Server**, a Model Context Protocol (MCP) server that co
99
- **Type:** MCP server application with CLI interface
1010
- **Primary Package:** github-mcp-server (stdio MCP server - **this is the main focus**)
1111
- **Secondary Package:** mcpcurl (testing utility - don't break it, but not the priority)
12-
- **Framework:** Uses mark3labs/mcp-go for MCP protocol, google/go-github for GitHub API
12+
- **Framework:** Uses modelcontextprotocol/go-sdk for MCP protocol, google/go-github for GitHub API
1313
- **Size:** ~60MB repository, 70 Go files
1414
- **Library Usage:** This repository is also used as a library by the remote server. Functions that could be called by other repositories should be exported (capitalized), even if not required internally. Preserve existing export patterns.
1515

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
messages:
2+
- role: system
3+
content: |
4+
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.
5+
6+
Your job is to analyze bug reports and assess their completeness.
7+
8+
Analyze the issue for these key elements:
9+
1. Clear description of the problem
10+
2. Affected version (from running `docker run -i --rm ghcr.io/github/github-mcp-server ./github-mcp-server --version`)
11+
3. Steps to reproduce the behavior
12+
4. Expected vs actual behavior
13+
5. Relevant logs (if applicable)
14+
15+
Provide ONE of these assessments:
16+
17+
### AI Assessment: Ready for Review
18+
Use when the bug report has most required information and can be triaged by a maintainer.
19+
20+
### AI Assessment: Missing Details
21+
Use when critical information is missing (no reproduction steps, no version info, unclear problem description).
22+
23+
### AI Assessment: Unsure
24+
Use when you cannot determine the completeness of the report.
25+
26+
After your assessment header, provide a brief explanation of your rating.
27+
If details are missing, note which specific sections need more information.
28+
- role: user
29+
content: "{{input}}"
30+
model: openai/gpt-4o-mini
31+
modelParameters:
32+
max_tokens: 500
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
messages:
2+
- role: system
3+
content: |
4+
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.
5+
6+
Your job is to analyze new issues and help categorize them.
7+
8+
Analyze the issue to determine:
9+
1. Is this a bug report, feature request, question, or something else?
10+
2. Is the issue clear and well-described?
11+
3. Does it contain enough information for maintainers to act on?
12+
13+
Provide ONE of these assessments:
14+
15+
### AI Assessment: Ready for Review
16+
Use when the issue is clear, well-described, and contains enough context for maintainers to understand and act on it.
17+
18+
### AI Assessment: Missing Details
19+
Use when the issue is unclear, lacks context, or needs more information to be actionable.
20+
21+
### AI Assessment: Unsure
22+
Use when you cannot determine the nature or completeness of the issue.
23+
24+
After your assessment header, provide a brief explanation including:
25+
- What type of issue this appears to be (bug, feature request, question, etc.)
26+
- What additional information might be helpful if any
27+
- role: user
28+
content: "{{input}}"
29+
model: openai/gpt-4o-mini
30+
modelParameters:
31+
max_tokens: 500
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: AI Issue Assessment
2+
3+
on:
4+
issues:
5+
types: [opened, labeled]
6+
7+
jobs:
8+
ai-issue-assessment:
9+
if: >
10+
(github.event.action == 'opened' && github.event.issue.labels[0] == null) ||
11+
(github.event.action == 'labeled' && github.event.label.name == 'bug')
12+
runs-on: ubuntu-latest
13+
permissions:
14+
issues: write
15+
models: read
16+
contents: read
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v6
21+
22+
- name: Run AI assessment
23+
uses: github/ai-assessment-comment-labeler@e3bedc38cfffa9179fe4cee8f7ecc93bffb3fee7 # v1.0.1
24+
with:
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
ai_review_label: 'bug, enhancement'
27+
issue_number: ${{ github.event.issue.number }}
28+
issue_body: ${{ github.event.issue.body }}
29+
prompts_directory: '.github/prompts'
30+
labels_to_prompts_mapping: 'bug,bug-report-review.prompt.yml|default,default-issue-review.prompt.yml'

.github/workflows/code-scanning.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
runner: '["ubuntu-22.04"]'
3636
steps:
3737
- name: Checkout repository
38-
uses: actions/checkout@v5
38+
uses: actions/checkout@v6
3939

4040
- name: Initialize CodeQL
4141
uses: github/codeql-action/init@v4

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040

4141
steps:
4242
- name: Checkout repository
43-
uses: actions/checkout@v5
43+
uses: actions/checkout@v6
4444

4545
# Install the cosign tool except on PR
4646
# https://github.com/sigstore/cosign-installer

.github/workflows/docs-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v5
17+
uses: actions/checkout@v6
1818

1919
- name: Set up Go
2020
uses: actions/setup-go@v6

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Check out code
18-
uses: actions/checkout@v5
18+
uses: actions/checkout@v6
1919

2020
- name: Set up Go
2121
uses: actions/setup-go@v6

.github/workflows/goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: Check out code
17-
uses: actions/checkout@v5
17+
uses: actions/checkout@v6
1818

1919
- name: Set up Go
2020
uses: actions/setup-go@v6

.github/workflows/license-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
steps:
1313
- name: Check out code
14-
uses: actions/checkout@v5
14+
uses: actions/checkout@v6
1515

1616
- name: Set up Go
1717
uses: actions/setup-go@v6

0 commit comments

Comments
 (0)