feat(robomp): added repo-scoped issue search to issue triage flow

- Added `search_issues` support to the GitHub backend and client, including `state_reason` and `is_pull_request` in issue summaries.
- Added the `gh_search_issues` host tool with repo-prefixed query handling, non-empty/restricted `repo:` validation, default and bounded `limit` values, and inbound issue filtering.
- Added proxy integration for issue search with a new `/gh/v1/search_issues` endpoint and matching proxy-client method/response parsing.
- Updated triage prompts to perform pre-`classify_issue` duplicate and already-fixed checks via search, and added tests for search query formatting, validation, and state-aware match rendering.
This commit is contained in:
can1357
2026-07-15 00:30:15 +02:00
parent 539c132094
commit 3e6ae36c7c
12 changed files with 257 additions and 19 deletions
+10
View File
@@ -513,6 +513,16 @@ def create_proxy_app(settings: Settings) -> FastAPI:
return _gh_error_response(exc)
return JSONResponse({"items": [_serialize(s) for s in items]})
@app.get("/gh/v1/search_issues")
async def search_issues(request: Request, repo: str, q: str, limit: int = 10) -> JSONResponse:
await _authenticate(request)
github: GitHubClient = request.app.state.github
try:
items = await github.search_issues(repo, q, limit=limit)
except GitHubError as exc:
return _gh_error_response(exc)
return JSONResponse({"items": [_serialize(s) for s in items]})
@app.get("/gh/v1/comments")
async def list_comments(request: Request, repo: str, number: int) -> JSONResponse:
await _authenticate(request)