-
Notifications
You must be signed in to change notification settings - Fork 194
Tool to search for issues #164
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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
Adds support for searching GitHub issues alongside the existing code and documentation search tools.
- Introduces
searchIssues
in the GitHub client and asearchRepositoryIssues
wrapper with formatted output and pagination. - Registers new issue-search tools in both the generic and default repo handlers.
- Updates tests to verify the new tools’ registration and descriptions.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/api/utils/githubClient.ts | Added searchIssues to call GitHub’s issues search API |
src/api/tools/commonTools.ts | Implemented searchRepositoryIssues and name/description generators |
src/api/tools/repoHandlers/GenericRepoHandler.ts | Registered search_generic_issues tool |
src/api/tools/repoHandlers/DefaultRepoHandler.ts | Registered default issue search tool with dynamic naming |
src/api/tools/index.test.ts | Extended tests to include the new issue-search tools |
Comments suppressed due to low confidence (2)
src/api/utils/githubClient.ts:288
- [nitpick] The return type is declared as
Promise<any>
, which makes callers lose type safety. Define and use an interface for the GitHub issues search response instead ofany
.
export async function searchIssues( query: string,
src/api/tools/index.test.ts:63
- The new
searchRepositoryIssues
behavior (e.g., no‐results, pagination, error cases) isn’t covered by unit tests. Add tests for those scenarios to ensure formatting and pagination logic works as intended.
search_myrepo_issues: {
* Search for issues in a GitHub repository | ||
* Supports filtering by issue state and pagination |
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.
[nitpick] The searchRepositoryIssues
JSDoc is missing @param
tags for each argument. Add parameter descriptions to clarify expected inputs and defaults.
* Search for issues in a GitHub repository | |
* Supports filtering by issue state and pagination | |
* Search for issues in a GitHub repository. | |
* Supports filtering by issue state and pagination. | |
* | |
* @param {RepoData} repoData - The repository data object containing owner and repo information. | |
* @param {string} query - The search query string to filter issues. | |
* @param {"open" | "closed" | "all"} [state="all"] - The state of issues to filter by. Defaults to "all". | |
* @param {number} [page=1] - The page number for pagination. Defaults to 1. | |
* @param {Env} env - The environment object containing configuration and secrets. | |
* @param {any} ctx - The context object for the request, used for logging and tracing. |
Copilot uses AI. Check for mistakes.
* Search for issues in a GitHub repository | ||
* Supports filtering by issue state and pagination | ||
*/ | ||
export async function searchRepositoryIssues({ |
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.
[nitpick] This function mixes data fetching and text formatting in one large block. Consider extracting the markdown‐generation logic into a helper to improve readability and testability.
Copilot uses AI. Check for mistakes.
owner, | ||
repo, | ||
}: RepoData): string { | ||
return `Search open or closed issues within the GitHub repository: "${owner}/${repo}".`; |
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.
[nitpick] The default description only mentions open/closed states but not pagination or the all
option. Align it with the generic tool description to avoid confusion.
return `Search open or closed issues within the GitHub repository: "${owner}/${repo}".`; | |
return `Search open or closed issues within the GitHub repository: "${owner}/${repo}". Supports pagination and the 'all' option to retrieve all matching issues.`; |
Copilot uses AI. Check for mistakes.
Thanks for the contribution @ShreyPaharia! Did you have a chance to test it out? Did the LLMs use it correctly? Did it help them reach a better answer? |
Welcome @idosal ! User How to solve the failure in parsing prd for this repo github.com/eyaltoledano/claude-task-master Cursor Let me help you investigate this issue. First, I'll try to match the library name to get the correct owner and repo information. Now that I have confirmed the repository information, let me fetch its documentation to understand what might be causing the parsing failure. I notice that there's no standard documentation available. Let me search through the repository's code to understand its structure and potential PRD-related files. I notice that there are some issues accessing the repository. Let me check if there are any open issues that might provide more context about this problem. Let me check the specific issue about PRD parsing failure to understand the problem better. Based on the issue and comments, I can help explain the PRD parsing failure and provide a solution. Here are the key points:
To solve this issue:
Would you like me to help you with any specific part of implementing these solutions? |
Implements #112