Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit87d4407

Browse files
williammartinSamMorrowDrums
authored andcommitted
Add boundaries to pagination
1 parent6b13742 commit87d4407

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

‎pkg/github/issues.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,12 @@ func searchIssues(client *github.Client, t translations.TranslationHelperFunc) (
164164
),
165165
mcp.WithNumber("per_page",
166166
mcp.Description("Results per page (max 100)"),
167+
mcp.Min(1),
168+
mcp.Max(100),
167169
),
168170
mcp.WithNumber("page",
169171
mcp.Description("Page number"),
172+
mcp.Min(1),
170173
),
171174
),
172175
func(ctx context.Context,request mcp.CallToolRequest) (*mcp.CallToolResult,error) {

‎pkg/github/search.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,12 @@ func searchCode(client *github.Client, t translations.TranslationHelperFunc) (to
8888
),
8989
mcp.WithNumber("per_page",
9090
mcp.Description("Results per page (max 100)"),
91+
mcp.Min(1),
92+
mcp.Max(100),
9193
),
9294
mcp.WithNumber("page",
9395
mcp.Description("Page number"),
96+
mcp.Min(1),
9497
),
9598
),
9699
func(ctx context.Context,request mcp.CallToolRequest) (*mcp.CallToolResult,error) {
@@ -165,9 +168,12 @@ func searchUsers(client *github.Client, t translations.TranslationHelperFunc) (t
165168
),
166169
mcp.WithNumber("per_page",
167170
mcp.Description("Results per page (max 100)"),
171+
mcp.Min(1),
172+
mcp.Max(100),
168173
),
169174
mcp.WithNumber("page",
170175
mcp.Description("Page number"),
176+
mcp.Min(1),
171177
),
172178
),
173179
func(ctx context.Context,request mcp.CallToolRequest) (*mcp.CallToolResult,error) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp