Skip to content

Commit 6b02799

Browse files
authored
fix issue with pagination in search_repositories (#129)
1 parent 270bbf7 commit 6b02799

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/github/search.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func searchRepositories(client *github.Client, t translations.TranslationHelperF
3636
if err != nil {
3737
return mcp.NewToolResultError(err.Error()), nil
3838
}
39-
perPage, err := optionalIntParamWithDefault(request, "per_page", 30)
39+
perPage, err := optionalIntParamWithDefault(request, "perPage", 30)
4040
if err != nil {
4141
return mcp.NewToolResultError(err.Error()), nil
4242
}

pkg/github/search_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ func Test_SearchRepositories(t *testing.T) {
7272
),
7373
),
7474
requestArgs: map[string]interface{}{
75-
"query": "golang test",
76-
"page": float64(2),
77-
"per_page": float64(10),
75+
"query": "golang test",
76+
"page": float64(2),
77+
"perPage": float64(10),
7878
},
7979
expectError: false,
8080
expectedResult: mockSearchResult,

0 commit comments

Comments
 (0)