- Notifications
You must be signed in to change notification settings - Fork2.7k
Add sort and order parameters to search_repositories tool#1191
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
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 explicit sorting parameters to thesearch_repositories
tool to improve model clarity when sorting search results. It aligns the tool's interface with other search tools by exposing the GitHub API's native sorting capabilities.
- Added
sort
parameter with enum values for different sorting criteria (stars, forks, help-wanted-issues, updated) - Added
order
parameter with enum values for sort direction (asc, desc) - Updated tests and documentation to reflect the new parameters
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
pkg/github/search.go | Implements the new sort and order parameters in the tool definition and request handling |
pkg/github/search_test.go | Adds test coverage for the new parameters in both schema validation and API call verification |
pkg/github/toolsnaps/search_repositories.snap | Updates the tool schema snapshot to include the new parameter definitions |
README.md | Documents the new sort and order parameters in the tool reference |
Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.
16b43c9
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This PR adds explicit
sort
andorder
params to thesearch_repositories
tool to align with othersearch_*
tools, especially as the relevant REST API endpoint does accept them. Additionally, it adds server instructions forsearch_*
tools related to sorting functionality.Changes
sort
param with enum values:stars
,forks
,help-wanted-issues
,updated
order
param with enum values:asc
,desc
sort
andorder
usage insearch_*
toolsCloses:#1178