You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
docs: Remove the list_unlabeled_issues tool from the issue triaging agent
Co-authored-by: Xuan Yang <xygoogle@google.com> PiperOrigin-RevId: 836416597
This commit is contained in:
committed by
Copybara-Service
parent
4a42d0d9d8
commit
b331d97dfb
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user