Skip to content

Commit 14dd881

Browse files
authored
Merge branch 'main' into kerobbi/response-optimisation
2 parents 92e6f44 + 851030c commit 14dd881

File tree

12 files changed

+796
-103
lines changed

12 files changed

+796
-103
lines changed

.github/prompts/bug-report-review.prompt.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,38 @@ messages:
55
66
Your job is to analyze bug reports and assess their completeness.
77
8+
**CRITICAL: Detect unfilled templates**
9+
- Flag issues containing unmodified template text like "A clear and concise description of what the bug is"
10+
- Flag placeholder values like "Type this '...'" or "View the output '....'" that haven't been replaced
11+
- Flag generic/meaningless titles (e.g., random words, test content)
12+
- These are ALWAYS "Missing Details" even if the template structure is present
13+
814
Analyze the issue for these key elements:
9-
1. Clear description of the problem
15+
1. Clear description of the problem (not template text)
1016
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
17+
3. Steps to reproduce the behavior (actual steps, not placeholders)
18+
4. Expected vs actual behavior (real descriptions, not template text)
1319
5. Relevant logs (if applicable)
1420
1521
Provide ONE of these assessments:
1622
1723
### AI Assessment: Ready for Review
18-
Use when the bug report has most required information and can be triaged by a maintainer.
24+
Use when the bug report has actual information in required fields and can be triaged by a maintainer.
1925
2026
### AI Assessment: Missing Details
21-
Use when critical information is missing (no reproduction steps, no version info, unclear problem description).
27+
Use when:
28+
- Template text has not been replaced with actual content
29+
- Critical information is missing (no reproduction steps, no version info, unclear problem description)
30+
- The title is meaningless or spam-like
31+
- Placeholder text remains in any section
32+
33+
When marking as Missing Details, recommend adding the "waiting-for-reply" label.
2234
2335
### AI Assessment: Unsure
2436
Use when you cannot determine the completeness of the report.
2537
2638
After your assessment header, provide a brief explanation of your rating.
27-
If details are missing, note which specific sections need more information.
39+
If details are missing, be specific about which sections contain template text or need actual information.
2840
- role: user
2941
content: "{{input}}"
3042
model: openai/gpt-4o-mini

.github/prompts/default-issue-review.prompt.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,47 @@ messages:
55
66
Your job is to analyze new issues and help categorize them.
77
8+
**CRITICAL: Detect invalid or incomplete submissions**
9+
- Flag issues with unmodified template text (e.g., "A clear and concise description...")
10+
- Flag placeholder values that haven't been replaced (e.g., "Type this '...'", "....", "XXX")
11+
- Flag meaningless, spam-like, or test titles (e.g., random words, nonsensical content)
12+
- Flag empty or nearly empty issues
13+
- These are ALWAYS "Missing Details" or "Invalid" depending on severity
14+
815
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?
16+
1. Is this a bug report, feature request, question, documentation issue, or something else?
17+
2. Is the issue clear and well-described with actual content (not template text)?
1118
3. Does it contain enough information for maintainers to act on?
19+
4. Is this potentially spam, a test issue, or completely invalid?
1220
1321
Provide ONE of these assessments:
1422
1523
### 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.
24+
Use when the issue is clear, well-described with actual content, and contains enough context for maintainers to understand and act on it.
1725
1826
### AI Assessment: Missing Details
19-
Use when the issue is unclear, lacks context, or needs more information to be actionable.
27+
Use when:
28+
- Template text has not been replaced with actual content
29+
- The issue is unclear or lacks context
30+
- Critical information is missing to make it actionable
31+
- The title is vague but the issue seems legitimate
32+
33+
When marking as Missing Details, recommend adding the "waiting-for-reply" label.
34+
35+
### AI Assessment: Invalid
36+
Use when:
37+
- The issue appears to be spam or test content
38+
- The title is completely meaningless and body has no useful information
39+
- This doesn't relate to the GitHub MCP Server project at all
40+
41+
When marking as Invalid, recommend adding the "invalid" label and consider closing.
2042
2143
### AI Assessment: Unsure
2244
Use when you cannot determine the nature or completeness of the issue.
2345
2446
After your assessment header, provide a brief explanation including:
25-
- What type of issue this appears to be (bug, feature request, question, etc.)
47+
- What type of issue this appears to be (bug, feature request, question, invalid, etc.)
48+
- Which specific sections contain template text or need actual information
2649
- What additional information might be helpful if any
2750
- role: user
2851
content: "{{input}}"

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -983,9 +983,10 @@ The following sets of tools are available:
983983
- `fields`: Specific list of field IDs to include in the response when getting a project item (e.g. ["102589", "985201", "169875"]). If not provided, only the title field is included. Only used for 'get_project_item' method. (string[], optional)
984984
- `item_id`: The item's ID. Required for 'get_project_item' method. (number, optional)
985985
- `method`: The method to execute (string, required)
986-
- `owner`: The owner (user or organization login). The name is not case sensitive. (string, required)
986+
- `owner`: The owner (user or organization login). The name is not case sensitive. (string, optional)
987987
- `owner_type`: Owner type (user or org). If not provided, will be automatically detected. (string, optional)
988-
- `project_number`: The project's number. (number, required)
988+
- `project_number`: The project's number. (number, optional)
989+
- `status_update_id`: The node ID of the project status update. Required for 'get_project_status_update' method. (string, optional)
989990

990991
- **projects_list** - List GitHub Projects resources
991992
- **Required OAuth Scopes**: `read:project`
@@ -997,11 +998,12 @@ The following sets of tools are available:
997998
- `owner`: The owner (user or organization login). The name is not case sensitive. (string, required)
998999
- `owner_type`: Owner type (user or org). If not provided, will automatically try both. (string, optional)
9991000
- `per_page`: Results per page (max 50) (number, optional)
1000-
- `project_number`: The project's number. Required for 'list_project_fields' and 'list_project_items' methods. (number, optional)
1001+
- `project_number`: The project's number. Required for 'list_project_fields', 'list_project_items', and 'list_project_status_updates' methods. (number, optional)
10011002
- `query`: Filter/query string. For list_projects: filter by title text and state (e.g. "roadmap is:open"). For list_project_items: advanced filtering using GitHub's project filtering syntax. (string, optional)
10021003

10031004
- **projects_write** - Modify GitHub Project items
10041005
- **Required OAuth Scopes**: `project`
1006+
- `body`: The body of the status update (markdown). Used for 'create_project_status_update' method. (string, optional)
10051007
- `issue_number`: The issue number (use when item_type is 'issue' for 'add_project_item' method). Provide either issue_number or pull_request_number. (number, optional)
10061008
- `item_id`: The project item ID. Required for 'update_project_item' and 'delete_project_item' methods. (number, optional)
10071009
- `item_owner`: The owner (user or organization) of the repository containing the issue or pull request. Required for 'add_project_item' method. (string, optional)
@@ -1012,6 +1014,9 @@ The following sets of tools are available:
10121014
- `owner_type`: Owner type (user or org). If not provided, will be automatically detected. (string, optional)
10131015
- `project_number`: The project's number. (number, required)
10141016
- `pull_request_number`: The pull request number (use when item_type is 'pull_request' for 'add_project_item' method). Provide either issue_number or pull_request_number. (number, optional)
1017+
- `start_date`: The start date of the status update in YYYY-MM-DD format. Used for 'create_project_status_update' method. (string, optional)
1018+
- `status`: The status of the project. Used for 'create_project_status_update' method. (string, optional)
1019+
- `target_date`: The target date of the status update in YYYY-MM-DD format. Used for 'create_project_status_update' method. (string, optional)
10151020
- `updated_field`: Object consisting of the ID of the project field to update and the new value for the field. To clear the field, set value to null. Example: {"id": 123456, "value": "New Value"}. Required for 'update_project_item' method. (object, optional)
10161021

10171022
</details>

pkg/github/__toolsnaps__/projects_get.snap

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"enum": [
2727
"get_project",
2828
"get_project_field",
29-
"get_project_item"
29+
"get_project_item",
30+
"get_project_status_update"
3031
],
3132
"type": "string"
3233
},
@@ -45,12 +46,14 @@
4546
"project_number": {
4647
"description": "The project's number.",
4748
"type": "number"
49+
},
50+
"status_update_id": {
51+
"description": "The node ID of the project status update. Required for 'get_project_status_update' method.",
52+
"type": "string"
4853
}
4954
},
5055
"required": [
51-
"method",
52-
"owner",
53-
"project_number"
56+
"method"
5457
],
5558
"type": "object"
5659
},

pkg/github/__toolsnaps__/projects_list.snap

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"enum": [
2727
"list_projects",
2828
"list_project_fields",
29-
"list_project_items"
29+
"list_project_items",
30+
"list_project_status_updates"
3031
],
3132
"type": "string"
3233
},
@@ -47,7 +48,7 @@
4748
"type": "number"
4849
},
4950
"project_number": {
50-
"description": "The project's number. Required for 'list_project_fields' and 'list_project_items' methods.",
51+
"description": "The project's number. Required for 'list_project_fields', 'list_project_items', and 'list_project_status_updates' methods.",
5152
"type": "number"
5253
},
5354
"query": {

pkg/github/__toolsnaps__/projects_write.snap

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
"destructiveHint": true,
44
"title": "Modify GitHub Project items"
55
},
6-
"description": "Add, update, or delete project items in a GitHub Project.",
6+
"description": "Add, update, or delete project items, or create status updates in a GitHub Project.",
77
"inputSchema": {
88
"properties": {
9+
"body": {
10+
"description": "The body of the status update (markdown). Used for 'create_project_status_update' method.",
11+
"type": "string"
12+
},
913
"issue_number": {
1014
"description": "The issue number (use when item_type is 'issue' for 'add_project_item' method). Provide either issue_number or pull_request_number.",
1115
"type": "number"
@@ -35,7 +39,8 @@
3539
"enum": [
3640
"add_project_item",
3741
"update_project_item",
38-
"delete_project_item"
42+
"delete_project_item",
43+
"create_project_status_update"
3944
],
4045
"type": "string"
4146
},
@@ -59,6 +64,25 @@
5964
"description": "The pull request number (use when item_type is 'pull_request' for 'add_project_item' method). Provide either issue_number or pull_request_number.",
6065
"type": "number"
6166
},
67+
"start_date": {
68+
"description": "The start date of the status update in YYYY-MM-DD format. Used for 'create_project_status_update' method.",
69+
"type": "string"
70+
},
71+
"status": {
72+
"description": "The status of the project. Used for 'create_project_status_update' method.",
73+
"enum": [
74+
"INACTIVE",
75+
"ON_TRACK",
76+
"AT_RISK",
77+
"OFF_TRACK",
78+
"COMPLETE"
79+
],
80+
"type": "string"
81+
},
82+
"target_date": {
83+
"description": "The target date of the status update in YYYY-MM-DD format. Used for 'create_project_status_update' method.",
84+
"type": "string"
85+
},
6286
"updated_field": {
6387
"description": "Object consisting of the ID of the project field to update and the new value for the field. To clear the field, set value to null. Example: {\"id\": 123456, \"value\": \"New Value\"}. Required for 'update_project_item' method.",
6488
"type": "object"

pkg/github/minimal_types.go

Lines changed: 71 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,29 @@ type MinimalIssueComment struct {
185185
UpdatedAt string `json:"updated_at,omitempty"`
186186
}
187187

188+
// MinimalFileContentResponse is the trimmed output type for create/update/delete file responses.
189+
type MinimalFileContentResponse struct {
190+
Content *MinimalFileContent `json:"content,omitempty"`
191+
Commit *MinimalFileCommit `json:"commit,omitempty"`
192+
}
193+
194+
// MinimalFileContent is the trimmed content portion of a file operation response.
195+
type MinimalFileContent struct {
196+
Name string `json:"name"`
197+
Path string `json:"path"`
198+
SHA string `json:"sha"`
199+
Size int `json:"size,omitempty"`
200+
HTMLURL string `json:"html_url"`
201+
}
202+
203+
// MinimalFileCommit is the trimmed commit portion of a file operation response.
204+
type MinimalFileCommit struct {
205+
SHA string `json:"sha"`
206+
Message string `json:"message,omitempty"`
207+
HTMLURL string `json:"html_url,omitempty"`
208+
Author *MinimalCommitAuthor `json:"author,omitempty"`
209+
}
210+
188211
// MinimalPullRequest is the trimmed output type for pull request objects to reduce verbosity.
189212
type MinimalPullRequest struct {
190213
Number int `json:"number"`
@@ -227,6 +250,16 @@ type MinimalPRBranchRepo struct {
227250
Description string `json:"description,omitempty"`
228251
}
229252

253+
type MinimalProjectStatusUpdate struct {
254+
ID string `json:"id"`
255+
Body string `json:"body,omitempty"`
256+
Status string `json:"status,omitempty"`
257+
CreatedAt string `json:"created_at,omitempty"`
258+
StartDate string `json:"start_date,omitempty"`
259+
TargetDate string `json:"target_date,omitempty"`
260+
Creator *MinimalUser `json:"creator,omitempty"`
261+
}
262+
230263
// Helper functions
231264

232265
func convertToMinimalIssue(issue *github.Issue) MinimalIssue {
@@ -328,6 +361,42 @@ func convertToMinimalIssueComment(comment *github.IssueComment) MinimalIssueComm
328361
return m
329362
}
330363

364+
func convertToMinimalFileContentResponse(resp *github.RepositoryContentResponse) MinimalFileContentResponse {
365+
m := MinimalFileContentResponse{}
366+
367+
if resp == nil {
368+
return m
369+
}
370+
371+
if c := resp.Content; c != nil {
372+
m.Content = &MinimalFileContent{
373+
Name: c.GetName(),
374+
Path: c.GetPath(),
375+
SHA: c.GetSHA(),
376+
Size: c.GetSize(),
377+
HTMLURL: c.GetHTMLURL(),
378+
}
379+
}
380+
381+
m.Commit = &MinimalFileCommit{
382+
SHA: resp.Commit.GetSHA(),
383+
Message: resp.Commit.GetMessage(),
384+
HTMLURL: resp.Commit.GetHTMLURL(),
385+
}
386+
387+
if author := resp.Commit.Author; author != nil {
388+
m.Commit.Author = &MinimalCommitAuthor{
389+
Name: author.GetName(),
390+
Email: author.GetEmail(),
391+
}
392+
if author.Date != nil {
393+
m.Commit.Author.Date = author.Date.Format(time.RFC3339)
394+
}
395+
}
396+
397+
return m
398+
}
399+
331400
func convertToMinimalPullRequest(pr *github.PullRequest) MinimalPullRequest {
332401
m := MinimalPullRequest{
333402
Number: pr.GetNumber(),
@@ -470,7 +539,7 @@ func convertToMinimalCommit(commit *github.RepositoryCommit, includeDiffs bool)
470539
Email: commit.Commit.Author.GetEmail(),
471540
}
472541
if commit.Commit.Author.Date != nil {
473-
minimalCommit.Commit.Author.Date = commit.Commit.Author.Date.Format("2006-01-02T15:04:05Z")
542+
minimalCommit.Commit.Author.Date = commit.Commit.Author.Date.Format(time.RFC3339)
474543
}
475544
}
476545

@@ -480,7 +549,7 @@ func convertToMinimalCommit(commit *github.RepositoryCommit, includeDiffs bool)
480549
Email: commit.Commit.Committer.GetEmail(),
481550
}
482551
if commit.Commit.Committer.Date != nil {
483-
minimalCommit.Commit.Committer.Date = commit.Commit.Committer.Date.Format("2006-01-02T15:04:05Z")
552+
minimalCommit.Commit.Committer.Date = commit.Commit.Committer.Date.Format(time.RFC3339)
484553
}
485554
}
486555
}

0 commit comments

Comments
 (0)