Skip to content

Commit 0674183

Browse files
authored
Merge branch 'main' into feat/259/assign-reviewers
2 parents 5650e1d + efef8ae commit 0674183

23 files changed

+2356
-296
lines changed

README.md

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -449,21 +449,23 @@ The following sets of tools are available (all are on by default):
449449
- `repo`: Repository name (string, required)
450450

451451
- **get_discussion_comments** - Get discussion comments
452+
- `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
452453
- `discussionNumber`: Discussion Number (number, required)
453454
- `owner`: Repository owner (string, required)
455+
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
454456
- `repo`: Repository name (string, required)
455457

456458
- **list_discussion_categories** - List discussion categories
457-
- `after`: Cursor for pagination, use the 'after' field from the previous response (string, optional)
458-
- `before`: Cursor for pagination, use the 'before' field from the previous response (string, optional)
459-
- `first`: Number of categories to return per page (min 1, max 100) (number, optional)
460-
- `last`: Number of categories to return from the end (min 1, max 100) (number, optional)
461459
- `owner`: Repository owner (string, required)
462460
- `repo`: Repository name (string, required)
463461

464462
- **list_discussions** - List discussions
463+
- `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
465464
- `category`: Optional filter by discussion category ID. If provided, only discussions with this category are listed. (string, optional)
465+
- `direction`: Order direction. (string, optional)
466+
- `orderBy`: Order discussions by field. If provided, the 'direction' also needs to be provided. (string, optional)
466467
- `owner`: Repository owner (string, required)
468+
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
467469
- `repo`: Repository name (string, required)
468470

469471
</details>
@@ -478,6 +480,13 @@ The following sets of tools are available (all are on by default):
478480
- `owner`: Repository owner (string, required)
479481
- `repo`: Repository name (string, required)
480482

483+
- **add_sub_issue** - Add sub-issue
484+
- `issue_number`: The number of the parent issue (number, required)
485+
- `owner`: Repository owner (string, required)
486+
- `replace_parent`: When true, replaces the sub-issue's current parent issue (boolean, optional)
487+
- `repo`: Repository name (string, required)
488+
- `sub_issue_id`: The ID of the sub-issue to add. ID is not the same as issue number (number, required)
489+
481490
- **assign_copilot_to_issue** - Assign Copilot to issue
482491
- `issueNumber`: Issue number (number, required)
483492
- `owner`: Repository owner (string, required)
@@ -515,6 +524,27 @@ The following sets of tools are available (all are on by default):
515524
- `sort`: Sort order (string, optional)
516525
- `state`: Filter by state (string, optional)
517526

527+
- **list_sub_issues** - List sub-issues
528+
- `issue_number`: Issue number (number, required)
529+
- `owner`: Repository owner (string, required)
530+
- `page`: Page number for pagination (default: 1) (number, optional)
531+
- `per_page`: Number of results per page (max 100, default: 30) (number, optional)
532+
- `repo`: Repository name (string, required)
533+
534+
- **remove_sub_issue** - Remove sub-issue
535+
- `issue_number`: The number of the parent issue (number, required)
536+
- `owner`: Repository owner (string, required)
537+
- `repo`: Repository name (string, required)
538+
- `sub_issue_id`: The ID of the sub-issue to remove. ID is not the same as issue number (number, required)
539+
540+
- **reprioritize_sub_issue** - Reprioritize sub-issue
541+
- `after_id`: The ID of the sub-issue to be prioritized after (either after_id OR before_id should be specified) (number, optional)
542+
- `before_id`: The ID of the sub-issue to be prioritized before (either after_id OR before_id should be specified) (number, optional)
543+
- `issue_number`: The number of the parent issue (number, required)
544+
- `owner`: Repository owner (string, required)
545+
- `repo`: Repository name (string, required)
546+
- `sub_issue_id`: The ID of the sub-issue to reprioritize. ID is not the same as issue number (number, required)
547+
518548
- **search_issues** - Search issues
519549
- `order`: Sort order (string, optional)
520550
- `owner`: Optional repository owner. If provided with repo, only notifications for this repository are listed. (string, optional)
@@ -809,7 +839,7 @@ The following sets of tools are available (all are on by default):
809839
- `order`: Sort order (string, optional)
810840
- `page`: Page number for pagination (min 1) (number, optional)
811841
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
812-
- `q`: Search query using GitHub code search syntax (string, required)
842+
- `query`: Search query using GitHub code search syntax (string, required)
813843
- `sort`: Sort field ('indexed' only) (string, optional)
814844

815845
- **search_repositories** - Search repositories

cmd/mcpcurl/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,26 @@ be executed against the configured MCP server.
1515

1616
## Installation
1717

18+
### Prerequisites
19+
- Go 1.21 or later
20+
- Access to the GitHub MCP Server from either Docker or local build
21+
22+
### Build from Source
23+
```bash
24+
cd cmd/mcpcurl
25+
go build -o mcpcurl
26+
```
27+
28+
### Using Go Install
29+
```bash
30+
go install github.com/github/github-mcp-server/cmd/mcpcurl@latest
31+
```
32+
33+
### Verify Installation
34+
```bash
35+
./mcpcurl --help
36+
```
37+
1838
## Usage
1939

2040
```console

cmd/mcpcurl/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ func addCommandFromTool(toolsCmd *cobra.Command, tool *Tool, prettyPrint bool) {
280280
}
281281
case "number":
282282
cmd.Flags().Float64(name, 0, description)
283+
case "integer":
284+
cmd.Flags().Int64(name, 0, description)
283285
case "boolean":
284286
cmd.Flags().Bool(name, false, description)
285287
case "array":
@@ -319,6 +321,10 @@ func buildArgumentsMap(cmd *cobra.Command, tool *Tool) (map[string]interface{},
319321
if value, _ := cmd.Flags().GetFloat64(name); value != 0 {
320322
arguments[name] = value
321323
}
324+
case "integer":
325+
if value, _ := cmd.Flags().GetInt64(name); value != 0 {
326+
arguments[name] = value
327+
}
322328
case "boolean":
323329
// For boolean, we need to check if it was explicitly set
324330
if cmd.Flags().Changed(name) {

docs/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This project uses a combination of unit tests and end-to-end (e2e) tests to ensu
2222
## toolsnaps: Tool Schema Snapshots
2323

2424
- The `toolsnaps` utility ensures that the JSON schema for each tool does not change unexpectedly.
25-
- Snapshots are stored in `__toolsnaps__/*.snap` files , where `*` represents the name of the tool
25+
- Snapshots are stored in `__toolsnaps__/*.snap` files, where `*` represents the name of the tool
2626
- When running tests, the current tool schema is compared to the snapshot. If there is a difference, the test will fail and show a diff.
2727
- If you intentionally change a tool's schema, update the snapshots by running tests with the environment variable: `UPDATE_TOOLSNAPS=true go test ./...`
2828
- In CI (when `GITHUB_ACTIONS=true`), missing snapshots will cause a test failure to ensure snapshots are always
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"annotations": {
3+
"title": "Add sub-issue",
4+
"readOnlyHint": false
5+
},
6+
"description": "Add a sub-issue to a parent issue in a GitHub repository.",
7+
"inputSchema": {
8+
"properties": {
9+
"issue_number": {
10+
"description": "The number of the parent issue",
11+
"type": "number"
12+
},
13+
"owner": {
14+
"description": "Repository owner",
15+
"type": "string"
16+
},
17+
"replace_parent": {
18+
"description": "When true, replaces the sub-issue's current parent issue",
19+
"type": "boolean"
20+
},
21+
"repo": {
22+
"description": "Repository name",
23+
"type": "string"
24+
},
25+
"sub_issue_id": {
26+
"description": "The ID of the sub-issue to add. ID is not the same as issue number",
27+
"type": "number"
28+
}
29+
},
30+
"required": [
31+
"owner",
32+
"repo",
33+
"issue_number",
34+
"sub_issue_id"
35+
],
36+
"type": "object"
37+
},
38+
"name": "add_sub_issue"
39+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"annotations": {
3+
"title": "List sub-issues",
4+
"readOnlyHint": true
5+
},
6+
"description": "List sub-issues for a specific issue in a GitHub repository.",
7+
"inputSchema": {
8+
"properties": {
9+
"issue_number": {
10+
"description": "Issue number",
11+
"type": "number"
12+
},
13+
"owner": {
14+
"description": "Repository owner",
15+
"type": "string"
16+
},
17+
"page": {
18+
"description": "Page number for pagination (default: 1)",
19+
"type": "number"
20+
},
21+
"per_page": {
22+
"description": "Number of results per page (max 100, default: 30)",
23+
"type": "number"
24+
},
25+
"repo": {
26+
"description": "Repository name",
27+
"type": "string"
28+
}
29+
},
30+
"required": [
31+
"owner",
32+
"repo",
33+
"issue_number"
34+
],
35+
"type": "object"
36+
},
37+
"name": "list_sub_issues"
38+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"annotations": {
3+
"title": "Remove sub-issue",
4+
"readOnlyHint": false
5+
},
6+
"description": "Remove a sub-issue from a parent issue in a GitHub repository.",
7+
"inputSchema": {
8+
"properties": {
9+
"issue_number": {
10+
"description": "The number of the parent issue",
11+
"type": "number"
12+
},
13+
"owner": {
14+
"description": "Repository owner",
15+
"type": "string"
16+
},
17+
"repo": {
18+
"description": "Repository name",
19+
"type": "string"
20+
},
21+
"sub_issue_id": {
22+
"description": "The ID of the sub-issue to remove. ID is not the same as issue number",
23+
"type": "number"
24+
}
25+
},
26+
"required": [
27+
"owner",
28+
"repo",
29+
"issue_number",
30+
"sub_issue_id"
31+
],
32+
"type": "object"
33+
},
34+
"name": "remove_sub_issue"
35+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"annotations": {
3+
"title": "Reprioritize sub-issue",
4+
"readOnlyHint": false
5+
},
6+
"description": "Reprioritize a sub-issue to a different position in the parent issue's sub-issue list.",
7+
"inputSchema": {
8+
"properties": {
9+
"after_id": {
10+
"description": "The ID of the sub-issue to be prioritized after (either after_id OR before_id should be specified)",
11+
"type": "number"
12+
},
13+
"before_id": {
14+
"description": "The ID of the sub-issue to be prioritized before (either after_id OR before_id should be specified)",
15+
"type": "number"
16+
},
17+
"issue_number": {
18+
"description": "The number of the parent issue",
19+
"type": "number"
20+
},
21+
"owner": {
22+
"description": "Repository owner",
23+
"type": "string"
24+
},
25+
"repo": {
26+
"description": "Repository name",
27+
"type": "string"
28+
},
29+
"sub_issue_id": {
30+
"description": "The ID of the sub-issue to reprioritize. ID is not the same as issue number",
31+
"type": "number"
32+
}
33+
},
34+
"required": [
35+
"owner",
36+
"repo",
37+
"issue_number",
38+
"sub_issue_id"
39+
],
40+
"type": "object"
41+
},
42+
"name": "reprioritize_sub_issue"
43+
}

pkg/github/__toolsnaps__/search_code.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"minimum": 1,
2626
"type": "number"
2727
},
28-
"q": {
28+
"query": {
2929
"description": "Search query using GitHub code search syntax",
3030
"type": "string"
3131
},
@@ -35,7 +35,7 @@
3535
}
3636
},
3737
"required": [
38-
"q"
38+
"query"
3939
],
4040
"type": "object"
4141
},

pkg/github/actions.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ func ListWorkflows(getClient GetClientFn, t translations.TranslationHelperFunc)
6262

6363
// Set up list options
6464
opts := &github.ListOptions{
65-
PerPage: pagination.perPage,
66-
Page: pagination.page,
65+
PerPage: pagination.PerPage,
66+
Page: pagination.Page,
6767
}
6868

6969
workflows, resp, err := client.Actions.ListWorkflows(ctx, owner, repo, opts)
@@ -200,8 +200,8 @@ func ListWorkflowRuns(getClient GetClientFn, t translations.TranslationHelperFun
200200
Event: event,
201201
Status: status,
202202
ListOptions: github.ListOptions{
203-
PerPage: pagination.perPage,
204-
Page: pagination.page,
203+
PerPage: pagination.PerPage,
204+
Page: pagination.Page,
205205
},
206206
}
207207

@@ -503,8 +503,8 @@ func ListWorkflowJobs(getClient GetClientFn, t translations.TranslationHelperFun
503503
opts := &github.ListWorkflowJobsOptions{
504504
Filter: filter,
505505
ListOptions: github.ListOptions{
506-
PerPage: pagination.perPage,
507-
Page: pagination.page,
506+
PerPage: pagination.PerPage,
507+
Page: pagination.Page,
508508
},
509509
}
510510

@@ -1025,8 +1025,8 @@ func ListWorkflowRunArtifacts(getClient GetClientFn, t translations.TranslationH
10251025

10261026
// Set up list options
10271027
opts := &github.ListOptions{
1028-
PerPage: pagination.perPage,
1029-
Page: pagination.page,
1028+
PerPage: pagination.PerPage,
1029+
Page: pagination.Page,
10301030
}
10311031

10321032
artifacts, resp, err := client.Actions.ListWorkflowRunArtifacts(ctx, owner, repo, runID, opts)

0 commit comments

Comments
 (0)