- Notifications
You must be signed in to change notification settings - Fork897
Add boundaries to pagination#86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR adds boundaries to pagination parameters to ensure that the "per_page" values remain between 1 and 100 and that the "page" value is at least 1.
- Enforces minimum and maximum limits on the "per_page" parameter for code search, user search, and issues search.
- Enforces a minimum bound on the "page" parameter in each function.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
pkg/github/search.go | Added mcp.Min and mcp.Max validations for pagination options in searchCode and searchUsers functions. |
pkg/github/issues.go | Added mcp.Min and mcp.Max validations for pagination options in searchIssues function. |
Comments suppressed due to low confidence (2)
pkg/github/search.go:91
- The new pagination boundary validations in this file are not covered by tests. Consider adding test cases to ensure the validations behave as expected.
mcp.Min(1),
pkg/github/issues.go:167
- The pagination validation changes in this file lack test coverage. It is recommended to add tests verifying that the minimum and maximum boundaries are enforced correctly.
mcp.Min(1),
Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab.Learn more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
87d4407
intomainUh oh!
There was an error while loading.Please reload this page.
Description
Fixes#80
Reviewer Notes
There are no tests for this, also, it's not clear to me why
search_repositories
andlist_commits
have no minimum bounds on page but I'm doing the minimum to match anthropic right now.