Skip to content

Commit b331d97

Browse files
xuanyang15copybara-github
authored andcommitted
docs: Remove the list_unlabeled_issues tool from the issue triaging agent
Co-authored-by: Xuan Yang <xygoogle@google.com> PiperOrigin-RevId: 836416597
1 parent 4a42d0d commit b331d97

File tree

2 files changed

+2
-34
lines changed

2 files changed

+2
-34
lines changed

contributing/samples/adk_triaging_agent/agent.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -78,38 +78,6 @@
7878
APPROVAL_INSTRUCTION = "Only label them when the user approves the labeling!"
7979

8080

81-
def list_unlabeled_issues(issue_count: int) -> dict[str, Any]:
82-
"""List most recent `issue_count` number of unlabeled issues in the repo.
83-
84-
Args:
85-
issue_count: number of issues to return
86-
87-
Returns:
88-
The status of this request, with a list of issues when successful.
89-
"""
90-
url = f"{GITHUB_BASE_URL}/search/issues"
91-
query = f"repo:{OWNER}/{REPO} is:open is:issue no:label"
92-
params = {
93-
"q": query,
94-
"sort": "created",
95-
"order": "desc",
96-
"per_page": issue_count,
97-
"page": 1,
98-
}
99-
100-
try:
101-
response = get_request(url, params)
102-
except requests.exceptions.RequestException as e:
103-
return error_response(f"Error: {e}")
104-
issues = response.get("items", None)
105-
106-
unlabeled_issues = []
107-
for issue in issues:
108-
if not issue.get("labels", None):
109-
unlabeled_issues.append(issue)
110-
return {"status": "success", "issues": unlabeled_issues}
111-
112-
11381
def list_planned_untriaged_issues(issue_count: int) -> dict[str, Any]:
11482
"""List planned issues without component labels (e.g., core, tools, etc.).
11583
@@ -276,7 +244,6 @@ def change_issue_type(issue_number: int, issue_type: str) -> dict[str, Any]:
276244
- the owner of the label if you assign the issue to an owner
277245
""",
278246
tools=[
279-
list_unlabeled_issues,
280247
list_planned_untriaged_issues,
281248
add_label_and_owner_to_issue,
282249
change_issue_type,

contributing/samples/adk_triaging_agent/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ async def main():
144144
f" most recent {issue_count} planned issues that haven't been"
145145
" triaged yet (i.e., issues with 'planned' label but no component"
146146
" labels like 'core', 'tools', etc.). Then triage each of them by"
147-
" applying appropriate component labels."
147+
" applying appropriate component labels. If you cannot find any planned"
148+
" issues, please don't try to triage any issues."
148149
)
149150

150151
response = await call_agent_async(runner, USER_ID, session.id, prompt)

0 commit comments

Comments
 (0)