Skip to content

Commit 59d76d6

Browse files
tommaso-moroCopilot
andcommitted
Reimplement issue dependencies on go-github v89 REST API
Issue dependencies (blocked_by / blocking) were implemented on GraphQL via githubv4. Because the pinned githubv4 library predates the dependency mutations, the code hand-declared AddBlockedByInput / RemoveBlockedByInput and resolved issue numbers to node IDs with a custom aliased query. go-github v89 adds first-class REST methods (ListBlockedBy, ListBlocking, AddBlockedBy, RemoveBlockedBy), so switch issue_dependency_read and issue_dependency_write to those. This removes the workaround, aligns the tools with the rest of the REST-based issue tooling, and simplifies tests. - Bump go-github v87 -> v89 across the module. - Adapt gists.go to v89: Gists.Create takes CreateGistRequest by value and Gists.Edit is renamed to Gists.Update with UpdateGistRequest. - Update repositories_test.go for RepositoryRelease value-type fields. - Rewrite issue_dependencies.go on REST: page-based pagination for reads, and a single Issues.Get to resolve the blocking issue's database ID for writes. Preserve the tool surface, self-dependency guard and cross-repo support. - Rewrite the issue dependency tests on the REST mock helpers. - Regenerate toolsnaps, docs and third-party license files. Refs #950 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 40db5e3 commit 59d76d6

69 files changed

Lines changed: 369 additions & 484 deletions

Some content is hidden

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

docs/feature-flags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,14 +310,14 @@ runtime behavior (such as output formatting) won't appear here.
310310

311311
- **issue_dependency_read** - Read issue dependencies
312312
- **Required OAuth Scopes**: `repo`
313-
- `after`: Cursor for pagination. Use the cursor from the previous response. (string, optional)
314313
- `issue_number`: The number of the issue (number, required)
315314
- `method`: The read operation to perform on a single issue's dependencies.
316315
Options are:
317316
1. get_blocked_by - List the issues that block this issue (this issue is blocked by them).
318317
2. get_blocking - List the issues that this issue blocks.
319318
(string, required)
320319
- `owner`: The owner of the repository (string, required)
320+
- `page`: Page number for pagination (min 1) (number, optional)
321321
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
322322
- `repo`: The name of the repository (string, required)
323323

docs/insiders-features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ The list below is generated from the Go source. It covers tool **inventory and s
105105

106106
- **issue_dependency_read** - Read issue dependencies
107107
- **Required OAuth Scopes**: `repo`
108-
- `after`: Cursor for pagination. Use the cursor from the previous response. (string, optional)
109108
- `issue_number`: The number of the issue (number, required)
110109
- `method`: The read operation to perform on a single issue's dependencies.
111110
Options are:
112111
1. get_blocked_by - List the issues that block this issue (this issue is blocked by them).
113112
2. get_blocking - List the issues that this issue blocks.
114113
(string, required)
115114
- `owner`: The owner of the repository (string, required)
115+
- `page`: Page number for pagination (min 1) (number, optional)
116116
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
117117
- `repo`: The name of the repository (string, required)
118118

e2e/e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"github.com/github/github-mcp-server/internal/ghmcp"
1919
"github.com/github/github-mcp-server/pkg/github"
2020
"github.com/github/github-mcp-server/pkg/translations"
21-
gogithub "github.com/google/go-github/v87/github"
21+
gogithub "github.com/google/go-github/v89/github"
2222
"github.com/modelcontextprotocol/go-sdk/mcp"
2323
"github.com/stretchr/testify/require"
2424
)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.25.0
55
require (
66
github.com/go-chi/chi/v5 v5.3.0
77
github.com/go-viper/mapstructure/v2 v2.5.0
8-
github.com/google/go-github/v87 v87.0.0
8+
github.com/google/go-github/v89 v89.0.0
99
github.com/google/jsonschema-go v0.4.3
1010
github.com/josephburnett/jd/v2 v2.5.0
1111
github.com/lithammer/fuzzysearch v1.1.8

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArs
1616
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
1717
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
1818
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
19-
github.com/google/go-github/v87 v87.0.0 h1:9Ck3dcOxWJyfsN8tzdah4YvmqB/7ZsstMglv/PkOsl0=
20-
github.com/google/go-github/v87 v87.0.0/go.mod h1:hGUoT5pwm/ck5uLL+wroSVQfg8mpe+buxllCcGV4VaM=
19+
github.com/google/go-github/v89 v89.0.0 h1:35bEK5XoEcF3PZrlVbl9XN63f5BcJRA/UGkxeC9xPg0=
20+
github.com/google/go-github/v89 v89.0.0/go.mod h1:QLcbU0ipeAqQuR5KSg8c2lql4Qk1EwJ2dWz/0rP4Nho=
2121
github.com/google/go-querystring v1.2.0 h1:yhqkPbu2/OH+V9BfpCVPZkNmUXhb2gBxJArfhIxNtP0=
2222
github.com/google/go-querystring v1.2.0/go.mod h1:8IFJqpSRITyJ8QhQ13bmbeMBDfmeEJZD5A0egEOmkqU=
2323
github.com/google/jsonschema-go v0.4.3 h1:/DBOLZTfDow7pe2GmaJNhltueGTtDKICi8V8p+DQPd0=

internal/ghmcp/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"github.com/github/github-mcp-server/pkg/scopes"
2626
"github.com/github/github-mcp-server/pkg/translations"
2727
"github.com/github/github-mcp-server/pkg/utils"
28-
gogithub "github.com/google/go-github/v87/github"
28+
gogithub "github.com/google/go-github/v89/github"
2929
"github.com/modelcontextprotocol/go-sdk/mcp"
3030
"github.com/shurcooL/githubv4"
3131
)

pkg/errors/error.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"time"
99

1010
"github.com/github/github-mcp-server/pkg/utils"
11-
"github.com/google/go-github/v87/github"
11+
"github.com/google/go-github/v89/github"
1212
"github.com/modelcontextprotocol/go-sdk/mcp"
1313
)
1414

pkg/errors/error_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package errors
33
import (
44
"context"
55
"fmt"
6-
"github.com/google/go-github/v87/github"
6+
"github.com/google/go-github/v89/github"
77
"github.com/modelcontextprotocol/go-sdk/mcp"
88
"github.com/stretchr/testify/assert"
99
"github.com/stretchr/testify/require"

pkg/github/__toolsnaps__/issue_dependency_read_ff_issue_dependencies.snap

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
"description": "Read an issue's dependency relationships in a GitHub repository: the issues that block it (blocked_by) or the issues it blocks (blocking).",
88
"inputSchema": {
99
"properties": {
10-
"after": {
11-
"description": "Cursor for pagination. Use the cursor from the previous response.",
12-
"type": "string"
13-
},
1410
"issue_number": {
1511
"description": "The number of the issue",
1612
"type": "number"
@@ -27,6 +23,11 @@
2723
"description": "The owner of the repository",
2824
"type": "string"
2925
},
26+
"page": {
27+
"description": "Page number for pagination (min 1)",
28+
"minimum": 1,
29+
"type": "number"
30+
},
3031
"perPage": {
3132
"description": "Results per page for pagination (min 1, max 100)",
3233
"maximum": 100,

pkg/github/actions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"github.com/github/github-mcp-server/pkg/scopes"
1818
"github.com/github/github-mcp-server/pkg/translations"
1919
"github.com/github/github-mcp-server/pkg/utils"
20-
"github.com/google/go-github/v87/github"
20+
"github.com/google/go-github/v89/github"
2121
"github.com/google/jsonschema-go/jsonschema"
2222
"github.com/modelcontextprotocol/go-sdk/mcp"
2323
)

0 commit comments

Comments
 (0)