From b331d97dfb14e2cc8e3783f56d04fb14b2236fe3 Mon Sep 17 00:00:00 2001 From: Xuan Yang Date: Mon, 24 Nov 2025 17:14:15 -0800 Subject: [PATCH] docs: Remove the `list_unlabeled_issues` tool from the issue triaging agent Co-authored-by: Xuan Yang PiperOrigin-RevId: 836416597 --- .../samples/adk_triaging_agent/agent.py | 33 ------------------- .../samples/adk_triaging_agent/main.py | 3 +- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/contributing/samples/adk_triaging_agent/agent.py b/contributing/samples/adk_triaging_agent/agent.py index 9504e72d..167eb3a6 100644 --- a/contributing/samples/adk_triaging_agent/agent.py +++ b/contributing/samples/adk_triaging_agent/agent.py @@ -78,38 +78,6 @@ if IS_INTERACTIVE: APPROVAL_INSTRUCTION = "Only label them when the user approves the labeling!" -def list_unlabeled_issues(issue_count: int) -> dict[str, Any]: - """List most recent `issue_count` number of unlabeled issues in the repo. - - Args: - issue_count: number of issues to return - - Returns: - The status of this request, with a list of issues when successful. - """ - url = f"{GITHUB_BASE_URL}/search/issues" - query = f"repo:{OWNER}/{REPO} is:open is:issue no:label" - params = { - "q": query, - "sort": "created", - "order": "desc", - "per_page": issue_count, - "page": 1, - } - - try: - response = get_request(url, params) - except requests.exceptions.RequestException as e: - return error_response(f"Error: {e}") - issues = response.get("items", None) - - unlabeled_issues = [] - for issue in issues: - if not issue.get("labels", None): - unlabeled_issues.append(issue) - return {"status": "success", "issues": unlabeled_issues} - - def list_planned_untriaged_issues(issue_count: int) -> dict[str, Any]: """List planned issues without component labels (e.g., core, tools, etc.). @@ -276,7 +244,6 @@ root_agent = Agent( - the owner of the label if you assign the issue to an owner """, tools=[ - list_unlabeled_issues, list_planned_untriaged_issues, add_label_and_owner_to_issue, change_issue_type, diff --git a/contributing/samples/adk_triaging_agent/main.py b/contributing/samples/adk_triaging_agent/main.py index f608a696..f24302ac 100644 --- a/contributing/samples/adk_triaging_agent/main.py +++ b/contributing/samples/adk_triaging_agent/main.py @@ -144,7 +144,8 @@ async def main(): f" most recent {issue_count} planned issues that haven't been" " triaged yet (i.e., issues with 'planned' label but no component" " labels like 'core', 'tools', etc.). Then triage each of them by" - " applying appropriate component labels." + " applying appropriate component labels. If you cannot find any planned" + " issues, please don't try to triage any issues." ) response = await call_agent_async(runner, USER_ID, session.id, prompt)