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
@@ -204,6 +204,14 @@ class GitHubProxyClient:
)
return [_issue_summary_from(item) for item in (data.get("items") if isinstance(data, dict) else None) or []]
async def search_issues(self, repo: str, query: str, *, limit: int = 10) -> list[IssueSummary]:
data = await self._request(
"GET",
"/gh/v1/search_issues",
params={"repo": repo, "q": query, "limit": limit},
)
return [_issue_summary_from(item) for item in (data.get("items") if isinstance(data, dict) else None) or []]
async def list_comments(self, repo: str, number: int) -> list[CommentInfo]:
data = await self._request("GET", "/gh/v1/comments", params={"repo": repo, "number": number})
return [_comment_from(item) for item in (data.get("items") if isinstance(data, dict) else None) or []]
@@ -498,6 +506,8 @@ def _issue_summary_from(data: Any) -> IssueSummary:
updated_at=str(data.get("updated_at") or ""),
created_at=str(data.get("created_at") or ""),
html_url=str(data.get("html_url") or ""),
state_reason=str(data.get("state_reason") or ""),
is_pull_request=bool(data.get("is_pull_request")),
)