Remerge remote-tracking branch 'origin/main' into fix-790-separate-issues-from-prs
This commit is contained in:
@@ -458,7 +458,7 @@ The following sets of tools are available (all are on by default):
|
||||
|
||||
- **list_discussion_categories** - List discussion categories
|
||||
- `owner`: Repository owner (string, required)
|
||||
- `repo`: Repository name (string, required)
|
||||
- `repo`: Repository name. If not provided, discussion categories will be queried at the organisation level. (string, optional)
|
||||
|
||||
- **list_discussions** - List discussions
|
||||
- `after`: Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs. (string, optional)
|
||||
@@ -572,11 +572,11 @@ The following sets of tools are available (all are on by default):
|
||||
|
||||
- **search_issues** - Search issues
|
||||
- `order`: Sort order (string, optional)
|
||||
- `owner`: Optional repository owner. If provided with repo, only notifications for this repository are listed. (string, optional)
|
||||
- `owner`: Optional repository owner. If provided with repo, only issues for this repository are listed. (string, optional)
|
||||
- `page`: Page number for pagination (min 1) (number, optional)
|
||||
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
|
||||
- `query`: Search query using GitHub issues search syntax (string, required)
|
||||
- `repo`: Optional repository name. If provided with owner, only notifications for this repository are listed. (string, optional)
|
||||
- `repo`: Optional repository name. If provided with owner, only issues for this repository are listed. (string, optional)
|
||||
- `sort`: Sort field by number of matches of categories, defaults to best match (string, optional)
|
||||
|
||||
- **update_issue** - Edit issue
|
||||
@@ -744,11 +744,11 @@ The following sets of tools are available (all are on by default):
|
||||
|
||||
- **search_pull_requests** - Search pull requests
|
||||
- `order`: Sort order (string, optional)
|
||||
- `owner`: Optional repository owner. If provided with repo, only notifications for this repository are listed. (string, optional)
|
||||
- `owner`: Optional repository owner. If provided with repo, only pull requests for this repository are listed. (string, optional)
|
||||
- `page`: Page number for pagination (min 1) (number, optional)
|
||||
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
|
||||
- `query`: Search query using GitHub pull request search syntax (string, required)
|
||||
- `repo`: Optional repository name. If provided with owner, only notifications for this repository are listed. (string, optional)
|
||||
- `repo`: Optional repository name. If provided with owner, only pull requests for this repository are listed. (string, optional)
|
||||
- `sort`: Sort field by number of matches of categories, defaults to best match (string, optional)
|
||||
|
||||
- **submit_pending_pull_request_review** - Submit the requester's latest pending pull request review
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/github/github-mcp-server/pkg/raw"
|
||||
"github.com/github/github-mcp-server/pkg/toolsets"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
gogithub "github.com/google/go-github/v73/github"
|
||||
gogithub "github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/shurcooL/githubv4"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ import (
|
||||
"github.com/github/github-mcp-server/internal/ghmcp"
|
||||
"github.com/github/github-mcp-server/pkg/github"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
gogithub "github.com/google/go-github/v73/github"
|
||||
gogithub "github.com/google/go-github/v74/github"
|
||||
mcpClient "github.com/mark3labs/mcp-go/client"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@@ -3,7 +3,7 @@ module github.com/github/github-mcp-server
|
||||
go 1.23.7
|
||||
|
||||
require (
|
||||
github.com/google/go-github/v73 v73.0.0
|
||||
github.com/google/go-github/v74 v74.0.0
|
||||
github.com/josephburnett/jd v1.9.2
|
||||
github.com/mark3labs/mcp-go v0.32.0
|
||||
github.com/migueleliasweb/go-github-mock v1.3.0
|
||||
|
||||
@@ -20,8 +20,8 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/go-github/v71 v71.0.0 h1:Zi16OymGKZZMm8ZliffVVJ/Q9YZreDKONCr+WUd0Z30=
|
||||
github.com/google/go-github/v71 v71.0.0/go.mod h1:URZXObp2BLlMjwu0O8g4y6VBneUj2bCHgnI8FfgZ51M=
|
||||
github.com/google/go-github/v73 v73.0.0 h1:aR+Utnh+Y4mMkS+2qLQwcQ/cF9mOTpdwnzlaw//rG24=
|
||||
github.com/google/go-github/v73 v73.0.0/go.mod h1:fa6w8+/V+edSU0muqdhCVY7Beh1M8F1IlQPZIANKIYw=
|
||||
github.com/google/go-github/v74 v74.0.0 h1:yZcddTUn8DPbj11GxnMrNiAnXH14gNs559AsUpNpPgM=
|
||||
github.com/google/go-github/v74 v74.0.0/go.mod h1:ubn/YdyftV80VPSI26nSJvaEsTOnsjrxG3o9kJhcyak=
|
||||
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
|
||||
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
mcplog "github.com/github/github-mcp-server/pkg/log"
|
||||
"github.com/github/github-mcp-server/pkg/raw"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
gogithub "github.com/google/go-github/v73/github"
|
||||
gogithub "github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
"github.com/shurcooL/githubv4"
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"owner": {
|
||||
"description": "Optional repository owner. If provided with repo, only notifications for this repository are listed.",
|
||||
"description": "Optional repository owner. If provided with repo, only issues for this repository are listed.",
|
||||
"type": "string"
|
||||
},
|
||||
"page": {
|
||||
@@ -34,7 +34,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"repo": {
|
||||
"description": "Optional repository name. If provided with owner, only notifications for this repository are listed.",
|
||||
"description": "Optional repository name. If provided with owner, only issues for this repository are listed.",
|
||||
"type": "string"
|
||||
},
|
||||
"sort": {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"owner": {
|
||||
"description": "Optional repository owner. If provided with repo, only notifications for this repository are listed.",
|
||||
"description": "Optional repository owner. If provided with repo, only pull requests for this repository are listed.",
|
||||
"type": "string"
|
||||
},
|
||||
"page": {
|
||||
@@ -34,7 +34,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"repo": {
|
||||
"description": "Optional repository name. If provided with owner, only notifications for this repository are listed.",
|
||||
"description": "Optional repository name. If provided with owner, only pull requests for this repository are listed.",
|
||||
"type": "string"
|
||||
},
|
||||
"sort": {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
ghErrors "github.com/github/github-mcp-server/pkg/errors"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/migueleliasweb/go-github-mock/src/mock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
ghErrors "github.com/github/github-mcp-server/pkg/errors"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/github/github-mcp-server/internal/toolsnaps"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/migueleliasweb/go-github-mock/src/mock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/github/github-mcp-server/internal/toolsnaps"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/migueleliasweb/go-github-mock/src/mock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
ghErrors "github.com/github/github-mcp-server/pkg/errors"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/github/github-mcp-server/internal/toolsnaps"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/migueleliasweb/go-github-mock/src/mock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
+16
-12
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/go-viper/mapstructure/v2"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
"github.com/shurcooL/githubv4"
|
||||
@@ -443,7 +443,7 @@ func GetDiscussionComments(getGQLClient GetGQLClientFn, t translations.Translati
|
||||
|
||||
func ListDiscussionCategories(getGQLClient GetGQLClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
|
||||
return mcp.NewTool("list_discussion_categories",
|
||||
mcp.WithDescription(t("TOOL_LIST_DISCUSSION_CATEGORIES_DESCRIPTION", "List discussion categories with their id and name, for a repository")),
|
||||
mcp.WithDescription(t("TOOL_LIST_DISCUSSION_CATEGORIES_DESCRIPTION", "List discussion categories with their id and name, for a repository or organisation.")),
|
||||
mcp.WithToolAnnotation(mcp.ToolAnnotation{
|
||||
Title: t("TOOL_LIST_DISCUSSION_CATEGORIES_USER_TITLE", "List discussion categories"),
|
||||
ReadOnlyHint: ToBoolPtr(true),
|
||||
@@ -453,19 +453,23 @@ func ListDiscussionCategories(getGQLClient GetGQLClientFn, t translations.Transl
|
||||
mcp.Description("Repository owner"),
|
||||
),
|
||||
mcp.WithString("repo",
|
||||
mcp.Required(),
|
||||
mcp.Description("Repository name"),
|
||||
mcp.Description("Repository name. If not provided, discussion categories will be queried at the organisation level."),
|
||||
),
|
||||
),
|
||||
func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
||||
// Decode params
|
||||
var params struct {
|
||||
Owner string
|
||||
Repo string
|
||||
}
|
||||
if err := mapstructure.Decode(request.Params.Arguments, ¶ms); err != nil {
|
||||
owner, err := RequiredParam[string](request, "owner")
|
||||
if err != nil {
|
||||
return mcp.NewToolResultError(err.Error()), nil
|
||||
}
|
||||
repo, err := OptionalParam[string](request, "repo")
|
||||
if err != nil {
|
||||
return mcp.NewToolResultError(err.Error()), nil
|
||||
}
|
||||
// when not provided, default to the .github repository
|
||||
// this will query discussion categories at the organisation level
|
||||
if repo == "" {
|
||||
repo = ".github"
|
||||
}
|
||||
|
||||
client, err := getGQLClient(ctx)
|
||||
if err != nil {
|
||||
@@ -490,8 +494,8 @@ func ListDiscussionCategories(getGQLClient GetGQLClientFn, t translations.Transl
|
||||
} `graphql:"repository(owner: $owner, name: $repo)"`
|
||||
}
|
||||
vars := map[string]interface{}{
|
||||
"owner": githubv4.String(params.Owner),
|
||||
"repo": githubv4.String(params.Repo),
|
||||
"owner": githubv4.String(owner),
|
||||
"repo": githubv4.String(repo),
|
||||
"first": githubv4.Int(25),
|
||||
}
|
||||
if err := client.Query(ctx, &q, vars); err != nil {
|
||||
|
||||
+111
-34
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
"github.com/github/github-mcp-server/internal/githubv4mock"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/shurcooL/githubv4"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
@@ -638,17 +638,33 @@ func Test_GetDiscussionComments(t *testing.T) {
|
||||
}
|
||||
|
||||
func Test_ListDiscussionCategories(t *testing.T) {
|
||||
mockClient := githubv4.NewClient(nil)
|
||||
toolDef, _ := ListDiscussionCategories(stubGetGQLClientFn(mockClient), translations.NullTranslationHelper)
|
||||
assert.Equal(t, "list_discussion_categories", toolDef.Name)
|
||||
assert.NotEmpty(t, toolDef.Description)
|
||||
assert.Contains(t, toolDef.Description, "or organisation")
|
||||
assert.Contains(t, toolDef.InputSchema.Properties, "owner")
|
||||
assert.Contains(t, toolDef.InputSchema.Properties, "repo")
|
||||
assert.ElementsMatch(t, toolDef.InputSchema.Required, []string{"owner"})
|
||||
|
||||
// Use exact string query that matches implementation output
|
||||
qListCategories := "query($first:Int!$owner:String!$repo:String!){repository(owner: $owner, name: $repo){discussionCategories(first: $first){nodes{id,name},pageInfo{hasNextPage,hasPreviousPage,startCursor,endCursor},totalCount}}}"
|
||||
|
||||
// Variables matching what GraphQL receives after JSON marshaling/unmarshaling
|
||||
vars := map[string]interface{}{
|
||||
// Variables for repository-level categories
|
||||
varsRepo := map[string]interface{}{
|
||||
"owner": "owner",
|
||||
"repo": "repo",
|
||||
"first": float64(25),
|
||||
}
|
||||
|
||||
mockResp := githubv4mock.DataResponse(map[string]any{
|
||||
// Variables for organization-level categories (using .github repo)
|
||||
varsOrg := map[string]interface{}{
|
||||
"owner": "owner",
|
||||
"repo": ".github",
|
||||
"first": float64(25),
|
||||
}
|
||||
|
||||
mockRespRepo := githubv4mock.DataResponse(map[string]any{
|
||||
"repository": map[string]any{
|
||||
"discussionCategories": map[string]any{
|
||||
"nodes": []map[string]any{
|
||||
@@ -665,37 +681,98 @@ func Test_ListDiscussionCategories(t *testing.T) {
|
||||
},
|
||||
},
|
||||
})
|
||||
matcher := githubv4mock.NewQueryMatcher(qListCategories, vars, mockResp)
|
||||
httpClient := githubv4mock.NewMockedHTTPClient(matcher)
|
||||
gqlClient := githubv4.NewClient(httpClient)
|
||||
|
||||
tool, handler := ListDiscussionCategories(stubGetGQLClientFn(gqlClient), translations.NullTranslationHelper)
|
||||
assert.Equal(t, "list_discussion_categories", tool.Name)
|
||||
assert.NotEmpty(t, tool.Description)
|
||||
assert.Contains(t, tool.InputSchema.Properties, "owner")
|
||||
assert.Contains(t, tool.InputSchema.Properties, "repo")
|
||||
assert.ElementsMatch(t, tool.InputSchema.Required, []string{"owner", "repo"})
|
||||
mockRespOrg := githubv4mock.DataResponse(map[string]any{
|
||||
"repository": map[string]any{
|
||||
"discussionCategories": map[string]any{
|
||||
"nodes": []map[string]any{
|
||||
{"id": "789", "name": "Announcements"},
|
||||
{"id": "101", "name": "General"},
|
||||
{"id": "112", "name": "Ideas"},
|
||||
},
|
||||
"pageInfo": map[string]any{
|
||||
"hasNextPage": false,
|
||||
"hasPreviousPage": false,
|
||||
"startCursor": "",
|
||||
"endCursor": "",
|
||||
},
|
||||
"totalCount": 3,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
request := createMCPRequest(map[string]interface{}{"owner": "owner", "repo": "repo"})
|
||||
result, err := handler(context.Background(), request)
|
||||
require.NoError(t, err)
|
||||
|
||||
text := getTextResult(t, result).Text
|
||||
|
||||
var response struct {
|
||||
Categories []map[string]string `json:"categories"`
|
||||
PageInfo struct {
|
||||
HasNextPage bool `json:"hasNextPage"`
|
||||
HasPreviousPage bool `json:"hasPreviousPage"`
|
||||
StartCursor string `json:"startCursor"`
|
||||
EndCursor string `json:"endCursor"`
|
||||
} `json:"pageInfo"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
tests := []struct {
|
||||
name string
|
||||
reqParams map[string]interface{}
|
||||
vars map[string]interface{}
|
||||
mockResponse githubv4mock.GQLResponse
|
||||
expectError bool
|
||||
expectedCount int
|
||||
expectedCategories []map[string]string
|
||||
}{
|
||||
{
|
||||
name: "list repository-level discussion categories",
|
||||
reqParams: map[string]interface{}{
|
||||
"owner": "owner",
|
||||
"repo": "repo",
|
||||
},
|
||||
vars: varsRepo,
|
||||
mockResponse: mockRespRepo,
|
||||
expectError: false,
|
||||
expectedCount: 2,
|
||||
expectedCategories: []map[string]string{
|
||||
{"id": "123", "name": "CategoryOne"},
|
||||
{"id": "456", "name": "CategoryTwo"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "list org-level discussion categories (no repo provided)",
|
||||
reqParams: map[string]interface{}{
|
||||
"owner": "owner",
|
||||
// repo is not provided, it will default to ".github"
|
||||
},
|
||||
vars: varsOrg,
|
||||
mockResponse: mockRespOrg,
|
||||
expectError: false,
|
||||
expectedCount: 3,
|
||||
expectedCategories: []map[string]string{
|
||||
{"id": "789", "name": "Announcements"},
|
||||
{"id": "101", "name": "General"},
|
||||
{"id": "112", "name": "Ideas"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
matcher := githubv4mock.NewQueryMatcher(qListCategories, tc.vars, tc.mockResponse)
|
||||
httpClient := githubv4mock.NewMockedHTTPClient(matcher)
|
||||
gqlClient := githubv4.NewClient(httpClient)
|
||||
|
||||
_, handler := ListDiscussionCategories(stubGetGQLClientFn(gqlClient), translations.NullTranslationHelper)
|
||||
|
||||
req := createMCPRequest(tc.reqParams)
|
||||
res, err := handler(context.Background(), req)
|
||||
text := getTextResult(t, res).Text
|
||||
|
||||
if tc.expectError {
|
||||
require.True(t, res.IsError)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
var response struct {
|
||||
Categories []map[string]string `json:"categories"`
|
||||
PageInfo struct {
|
||||
HasNextPage bool `json:"hasNextPage"`
|
||||
HasPreviousPage bool `json:"hasPreviousPage"`
|
||||
StartCursor string `json:"startCursor"`
|
||||
EndCursor string `json:"endCursor"`
|
||||
} `json:"pageInfo"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
require.NoError(t, json.Unmarshal([]byte(text), &response))
|
||||
assert.Equal(t, tc.expectedCategories, response.Categories)
|
||||
})
|
||||
}
|
||||
require.NoError(t, json.Unmarshal([]byte(text), &response))
|
||||
assert.Len(t, response.Categories, 2)
|
||||
assert.Equal(t, "123", response.Categories[0]["id"])
|
||||
assert.Equal(t, "CategoryOne", response.Categories[0]["name"])
|
||||
assert.Equal(t, "456", response.Categories[1]["id"])
|
||||
assert.Equal(t, "CategoryTwo", response.Categories[1]["name"])
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/migueleliasweb/go-github-mock/src/mock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
ghErrors "github.com/github/github-mcp-server/pkg/errors"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/go-viper/mapstructure/v2"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
"github.com/shurcooL/githubv4"
|
||||
@@ -691,10 +691,10 @@ func SearchIssues(getClient GetClientFn, t translations.TranslationHelperFunc) (
|
||||
mcp.Description("Search query using GitHub issues search syntax"),
|
||||
),
|
||||
mcp.WithString("owner",
|
||||
mcp.Description("Optional repository owner. If provided with repo, only notifications for this repository are listed."),
|
||||
mcp.Description("Optional repository owner. If provided with repo, only issues for this repository are listed."),
|
||||
),
|
||||
mcp.WithString("repo",
|
||||
mcp.Description("Optional repository name. If provided with owner, only notifications for this repository are listed."),
|
||||
mcp.Description("Optional repository name. If provided with owner, only issues for this repository are listed."),
|
||||
),
|
||||
mcp.WithString("sort",
|
||||
mcp.Description("Sort field by number of matches of categories, defaults to best match"),
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/github/github-mcp-server/internal/githubv4mock"
|
||||
"github.com/github/github-mcp-server/internal/toolsnaps"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/migueleliasweb/go-github-mock/src/mock"
|
||||
"github.com/shurcooL/githubv4"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
ghErrors "github.com/github/github-mcp-server/pkg/errors"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/github/github-mcp-server/internal/toolsnaps"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/migueleliasweb/go-github-mock/src/mock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/go-viper/mapstructure/v2"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
"github.com/shurcooL/githubv4"
|
||||
@@ -691,10 +691,10 @@ func SearchPullRequests(getClient GetClientFn, t translations.TranslationHelperF
|
||||
mcp.Description("Search query using GitHub pull request search syntax"),
|
||||
),
|
||||
mcp.WithString("owner",
|
||||
mcp.Description("Optional repository owner. If provided with repo, only notifications for this repository are listed."),
|
||||
mcp.Description("Optional repository owner. If provided with repo, only pull requests for this repository are listed."),
|
||||
),
|
||||
mcp.WithString("repo",
|
||||
mcp.Description("Optional repository name. If provided with owner, only notifications for this repository are listed."),
|
||||
mcp.Description("Optional repository name. If provided with owner, only pull requests for this repository are listed."),
|
||||
),
|
||||
mcp.WithString("sort",
|
||||
mcp.Description("Sort field by number of matches of categories, defaults to best match"),
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/github/github-mcp-server/internal/githubv4mock"
|
||||
"github.com/github/github-mcp-server/internal/toolsnaps"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/shurcooL/githubv4"
|
||||
|
||||
"github.com/migueleliasweb/go-github-mock/src/mock"
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
ghErrors "github.com/github/github-mcp-server/pkg/errors"
|
||||
"github.com/github/github-mcp-server/pkg/raw"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
)
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/github/github-mcp-server/internal/toolsnaps"
|
||||
"github.com/github/github-mcp-server/pkg/raw"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/migueleliasweb/go-github-mock/src/mock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
|
||||
"github.com/github/github-mcp-server/pkg/raw"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/github/github-mcp-server/pkg/raw"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/migueleliasweb/go-github-mock/src/mock"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
ghErrors "github.com/github/github-mcp-server/pkg/errors"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/github/github-mcp-server/internal/toolsnaps"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/migueleliasweb/go-github-mock/src/mock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
ghErrors "github.com/github/github-mcp-server/pkg/errors"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/migueleliasweb/go-github-mock/src/mock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/mcp"
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
)
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/github/github-mcp-server/pkg/raw"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/shurcooL/githubv4"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/github/github-mcp-server/pkg/raw"
|
||||
"github.com/github/github-mcp-server/pkg/toolsets"
|
||||
"github.com/github/github-mcp-server/pkg/translations"
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/mark3labs/mcp-go/server"
|
||||
"github.com/shurcooL/githubv4"
|
||||
)
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
gogithub "github.com/google/go-github/v73/github"
|
||||
gogithub "github.com/google/go-github/v74/github"
|
||||
)
|
||||
|
||||
// GetRawClientFn is a function type that returns a RawClient instance.
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import (
|
||||
"net/url"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-github/v73/github"
|
||||
"github.com/google/go-github/v74/github"
|
||||
"github.com/migueleliasweb/go-github-mock/src/mock"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@@ -13,7 +13,7 @@ Some packages may only be included on certain architectures or operating systems
|
||||
- [github.com/go-openapi/swag](https://pkg.go.dev/github.com/go-openapi/swag) ([Apache-2.0](https://github.com/go-openapi/swag/blob/v0.21.1/LICENSE))
|
||||
- [github.com/go-viper/mapstructure/v2](https://pkg.go.dev/github.com/go-viper/mapstructure/v2) ([MIT](https://github.com/go-viper/mapstructure/blob/v2.3.0/LICENSE))
|
||||
- [github.com/google/go-github/v71/github](https://pkg.go.dev/github.com/google/go-github/v71/github) ([BSD-3-Clause](https://github.com/google/go-github/blob/v71.0.0/LICENSE))
|
||||
- [github.com/google/go-github/v73/github](https://pkg.go.dev/github.com/google/go-github/v73/github) ([BSD-3-Clause](https://github.com/google/go-github/blob/v73.0.0/LICENSE))
|
||||
- [github.com/google/go-github/v74/github](https://pkg.go.dev/github.com/google/go-github/v74/github) ([BSD-3-Clause](https://github.com/google/go-github/blob/v74.0.0/LICENSE))
|
||||
- [github.com/google/go-querystring/query](https://pkg.go.dev/github.com/google/go-querystring/query) ([BSD-3-Clause](https://github.com/google/go-querystring/blob/v1.1.0/LICENSE))
|
||||
- [github.com/google/uuid](https://pkg.go.dev/github.com/google/uuid) ([BSD-3-Clause](https://github.com/google/uuid/blob/v1.6.0/LICENSE))
|
||||
- [github.com/gorilla/mux](https://pkg.go.dev/github.com/gorilla/mux) ([BSD-3-Clause](https://github.com/gorilla/mux/blob/v1.8.0/LICENSE))
|
||||
|
||||
@@ -13,7 +13,7 @@ Some packages may only be included on certain architectures or operating systems
|
||||
- [github.com/go-openapi/swag](https://pkg.go.dev/github.com/go-openapi/swag) ([Apache-2.0](https://github.com/go-openapi/swag/blob/v0.21.1/LICENSE))
|
||||
- [github.com/go-viper/mapstructure/v2](https://pkg.go.dev/github.com/go-viper/mapstructure/v2) ([MIT](https://github.com/go-viper/mapstructure/blob/v2.3.0/LICENSE))
|
||||
- [github.com/google/go-github/v71/github](https://pkg.go.dev/github.com/google/go-github/v71/github) ([BSD-3-Clause](https://github.com/google/go-github/blob/v71.0.0/LICENSE))
|
||||
- [github.com/google/go-github/v73/github](https://pkg.go.dev/github.com/google/go-github/v73/github) ([BSD-3-Clause](https://github.com/google/go-github/blob/v73.0.0/LICENSE))
|
||||
- [github.com/google/go-github/v74/github](https://pkg.go.dev/github.com/google/go-github/v74/github) ([BSD-3-Clause](https://github.com/google/go-github/blob/v74.0.0/LICENSE))
|
||||
- [github.com/google/go-querystring/query](https://pkg.go.dev/github.com/google/go-querystring/query) ([BSD-3-Clause](https://github.com/google/go-querystring/blob/v1.1.0/LICENSE))
|
||||
- [github.com/google/uuid](https://pkg.go.dev/github.com/google/uuid) ([BSD-3-Clause](https://github.com/google/uuid/blob/v1.6.0/LICENSE))
|
||||
- [github.com/gorilla/mux](https://pkg.go.dev/github.com/gorilla/mux) ([BSD-3-Clause](https://github.com/gorilla/mux/blob/v1.8.0/LICENSE))
|
||||
|
||||
@@ -13,7 +13,7 @@ Some packages may only be included on certain architectures or operating systems
|
||||
- [github.com/go-openapi/swag](https://pkg.go.dev/github.com/go-openapi/swag) ([Apache-2.0](https://github.com/go-openapi/swag/blob/v0.21.1/LICENSE))
|
||||
- [github.com/go-viper/mapstructure/v2](https://pkg.go.dev/github.com/go-viper/mapstructure/v2) ([MIT](https://github.com/go-viper/mapstructure/blob/v2.3.0/LICENSE))
|
||||
- [github.com/google/go-github/v71/github](https://pkg.go.dev/github.com/google/go-github/v71/github) ([BSD-3-Clause](https://github.com/google/go-github/blob/v71.0.0/LICENSE))
|
||||
- [github.com/google/go-github/v73/github](https://pkg.go.dev/github.com/google/go-github/v73/github) ([BSD-3-Clause](https://github.com/google/go-github/blob/v73.0.0/LICENSE))
|
||||
- [github.com/google/go-github/v74/github](https://pkg.go.dev/github.com/google/go-github/v74/github) ([BSD-3-Clause](https://github.com/google/go-github/blob/v74.0.0/LICENSE))
|
||||
- [github.com/google/go-querystring/query](https://pkg.go.dev/github.com/google/go-querystring/query) ([BSD-3-Clause](https://github.com/google/go-querystring/blob/v1.1.0/LICENSE))
|
||||
- [github.com/google/uuid](https://pkg.go.dev/github.com/google/uuid) ([BSD-3-Clause](https://github.com/google/uuid/blob/v1.6.0/LICENSE))
|
||||
- [github.com/gorilla/mux](https://pkg.go.dev/github.com/gorilla/mux) ([BSD-3-Clause](https://github.com/gorilla/mux/blob/v1.8.0/LICENSE))
|
||||
|
||||
Reference in New Issue
Block a user