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

Separate org and user search#486

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

Open
SamMorrowDrums wants to merge3 commits intomain
base:main
Choose a base branch
Loading
fromsearch_orgs
Open

Conversation

SamMorrowDrums
Copy link
Collaborator

In order to make separation of certain objects more clear we should separate them. This means orgs and users are not the same.

A follow-up will be to separate issue and PR search by also scoping the queries and producing separate functions. It is best for the LLM that it has clear boundaries, and concepts are consistent, rather than accepting the legacy API quirks.

@CopilotCopilotAI review requested due to automatic review settingsJune 5, 2025 22:13
@SamMorrowDrumsSamMorrowDrums requested a review froma team as acode ownerJune 5, 2025 22:13
Copy link
Contributor

@CopilotCopilotAI left a 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 separates organization searches from user searches by introducing dedicated tools and refactoring common logic.

  • Registers a neworgs toolset inInitToolsets.
  • Refactors search handlers withuserOrOrgHandler and adds a (currently unused)minimalAccountSearchHandler.
  • ImplementsSearchOrgs function and its tests insearch_test.go.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

FileDescription
pkg/github/tools.goAdded and registered"orgs" toolset alongside existing toolsets
pkg/github/search.goRefactored search logic, addeduserOrOrgHandler,SearchOrgs, and residualminimalAccountSearchHandler
pkg/github/search_test.goAddedTest_SearchOrgs suite to validate organization search tool
Comments suppressed due to low confidence (3)

pkg/github/search.go:163

  • TheminimalAccountSearchHandler function is never used. Consider removing it or integrating it into theuserOrOrgHandler to avoid dead code.
func minimalAccountSearchHandler(accountType string, query string, getClient GetClientFn, ctx context.Context, sort, order string, pagination PaginationParams) {

pkg/github/search.go:335

  • [nitpick] The translation keyTOOL_SEARCH_ORGS_USER_TITLE includesUSER although this is for organizations; consider renaming it toTOOL_SEARCH_ORGS_TITLE for consistency.
mcp.WithToolAnnotation(mcp.ToolAnnotation{ Title: t("TOOL_SEARCH_ORGS_USER_TITLE", "Search organizations"),

pkg/github/search_test.go:521

  • [nitpick] Tests forSearchOrgs cover the default pagination but don’t verify behavior when non-defaultsort,order, or pagination parameters are provided. Consider adding cases to cover those parameters.
requestArgs: map[string]interface{}{

@SamMorrowDrumsSamMorrowDrumsforce-pushed thesearch_orgs branch 2 times, most recently from6168095 tocaea5e0CompareJune 5, 2025 22:25
Base automatically changed fromcleanup-search-users tomainJune 6, 2025 09:24
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@SamMorrowDrums

[8]ページ先頭

©2009-2025 Movatter.jp