feat: Add tools to get and search issues #68
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The agent currently has tools to create, close, and comment on issues, but lacks the ability to read existing issues or search/filter issues. This limits its ability to:
Implementation Plan
1. Forgejo API Endpoints (
src/forgejo/index.ts)Add the following functions:
2. Schema Updates (
src/schemas.ts)Add parameter schemas for the list/search operations:
3. New Tools (
src/tools.ts)Add two new tools:
list-issues— List issues with filters:search-issues— Search issues by keyword:4. Register Tools (
src/main.ts)Add to
customToolsarray:5. Forgejo API Reference
/repos/{owner}/{repo}/issuesstate,labels,sort,direction,limit)/repos/{owner}/{repo}/issues/search?q={query}See: https://forgejo.gitea.io/api/latest/#tag/repository/operation/reposGetIssues
Example Agent Workflows
Scenario 1: Duplicate detection on new issue
Scenario 2: Triage by label
Scenario 3: Issue summarization
Files to Modify
src/schemas.tsissueStateSchema,issueSortSchema,issueDirectionSchema,listIssuesParamsSchema,searchIssuesParamsSchemasrc/forgejo/index.tslistIssues(),searchIssues()functionssrc/tools.tslistIssuesTool,searchIssuesToolexportssrc/main.tscustomToolsarrayPriority: Medium
Impact: High — enables issue triage, duplicate detection, and cross-referencing across all event types.