You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// ListIssues creates a tool to list and filter repository issues
1195
-
funcListIssues(getGQLClientGetGQLClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
1195
+
funcListIssues(getGQLClientGetGQLClientFn, t translations.TranslationHelperFunc, flagsFeatureFlags) (tool mcp.Tool, handler server.ToolHandlerFunc) {
1196
1196
returnmcp.NewTool("list_issues",
1197
1197
mcp.WithDescription(t("TOOL_LIST_ISSUES_DESCRIPTION", "List issues in a GitHub repository. For pagination, use the 'endCursor' from the previous response's 'pageInfo' in the 'after' parameter.")),
1198
1198
mcp.WithToolAnnotation(mcp.ToolAnnotation{
@@ -1384,9 +1384,8 @@ func ListIssues(getGQLClient GetGQLClientFn, t translations.TranslationHelperFun
1384
1384
totalCount=fragment.TotalCount
1385
1385
}
1386
1386
1387
-
// Create response with issues
1388
-
response:=map[string]interface{}{
1389
-
"issues": issues,
1387
+
// Create metadata for pagination
1388
+
metadata:=map[string]interface{}{
1390
1389
"pageInfo": map[string]interface{}{
1391
1390
"hasNextPage": pageInfo.HasNextPage,
1392
1391
"hasPreviousPage": pageInfo.HasPreviousPage,
@@ -1395,11 +1394,8 @@ func ListIssues(getGQLClient GetGQLClientFn, t translations.TranslationHelperFun
1395
1394
},
1396
1395
"totalCount": totalCount,
1397
1396
}
1398
-
out, err:=json.Marshal(response)
1399
-
iferr!=nil {
1400
-
returnnil, fmt.Errorf("failed to marshal issues: %w", err)
Copy file name to clipboardExpand all lines: pkg/github/pullrequests.go
+2-7Lines changed: 2 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -713,7 +713,7 @@ func UpdatePullRequest(getClient GetClientFn, getGQLClient GetGQLClientFn, t tra
713
713
}
714
714
715
715
// ListPullRequests creates a tool to list and filter repository pull requests.
716
-
funcListPullRequests(getClientGetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) {
716
+
funcListPullRequests(getClientGetClientFn, t translations.TranslationHelperFunc, flagsFeatureFlags) (mcp.Tool, server.ToolHandlerFunc) {
717
717
returnmcp.NewTool("list_pull_requests",
718
718
mcp.WithDescription(t("TOOL_LIST_PULL_REQUESTS_DESCRIPTION", "List pull requests in a GitHub repository. If the user specifies an author, then DO NOT use this tool and use the search_pull_requests tool instead.")),
719
719
mcp.WithToolAnnotation(mcp.ToolAnnotation{
@@ -828,12 +828,7 @@ func ListPullRequests(getClient GetClientFn, t translations.TranslationHelperFun
828
828
}
829
829
}
830
830
831
-
r, err:=json.Marshal(prs)
832
-
iferr!=nil {
833
-
returnnil, fmt.Errorf("failed to marshal response: %w", err)
// ListCommits creates a tool to get commits of a branch in a repository.
108
-
funcListCommits(getClientGetClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
109
+
funcListCommits(getClientGetClientFn, t translations.TranslationHelperFunc, flagsFeatureFlags) (tool mcp.Tool, handler server.ToolHandlerFunc) {
109
110
returnmcp.NewTool("list_commits",
110
111
mcp.WithDescription(t("TOOL_LIST_COMMITS_DESCRIPTION", "Get list of commits of a branch in a GitHub repository. Returns at least 30 results per page by default, but can return more if specified using the perPage parameter (up to 100).")),
111
112
mcp.WithToolAnnotation(mcp.ToolAnnotation{
@@ -191,12 +192,7 @@ func ListCommits(getClient GetClientFn, t translations.TranslationHelperFunc) (t
0 commit comments