You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: limit PR triaging agent to labeling and assigning
Drop the comment-posting tool so the sample bot only labels PRs and
assigns the component owner, instead of writing free-text responses.
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 948086786
Copy file name to clipboardExpand all lines: contributing/samples/adk_team/adk_pr_triaging_agent/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# ADK Pull Request Triaging Assistant
2
2
3
-
The ADK Pull Request (PR) Triaging Assistant is a Python-based agent designed to help manage and triage GitHub pull requests for the `google/adk-python` repository. It uses a large language model to analyze new and unlabelled pull requests, recommend appropriate labels, assign a reviewer, and check contribution guides based on a predefined set of rules.
3
+
The ADK Pull Request (PR) Triaging Assistant is a Python-based agent designed to help manage and triage GitHub pull requests for the `google/adk-python` repository. It uses a large language model to analyze new and unlabelled pull requests, recommend appropriate labels, and assign the component owner based on a predefined set of rules.
4
4
5
5
This agent can be operated in two distinct modes:
6
6
@@ -16,7 +16,7 @@ This mode allows you to run the agent locally to review its recommendations in r
16
16
### Features
17
17
18
18
-**Web Interface**: The agent's interactive mode can be rendered in a web browser using the ADK's `adk web` command.
19
-
-**User Approval**: In interactive mode, the agent is instructed to ask for your confirmation before applying a label or posting a comment to a GitHub pull request.
19
+
-**User Approval**: In interactive mode, the agent is instructed to ask for your confirmation before applying a label or assigning an owner to a GitHub pull request.
20
20
21
21
### Running in Interactive Mode
22
22
@@ -42,7 +42,7 @@ The GitHub workflow is configured to run on specific triggers:
42
42
43
43
### Automated Labeling
44
44
45
-
When running as part of the GitHub workflow, the agent operates non-interactively. It identifies and applies the best label or posts a comment directly without requiring user approval. This behavior is configured by setting the `INTERACTIVE` environment variable to `0` in the workflow file.
45
+
When running as part of the GitHub workflow, the agent operates non-interactively. It identifies and applies the best label and assigns the component owner directly without requiring user approval. This behavior is configured by setting the `INTERACTIVE` environment variable to `0` in the workflow file.
- If it's about Model Context Protocol (e.g. MCP tool, MCP toolset, MCP session management etc.), label it with "mcp".
368
334
- If you can't find an appropriate labels for the PR, follow the previous instruction that starts with "IMPORTANT:".
369
335
370
-
Here is the contribution guidelines:
371
-
`{CONTRIBUTING_MD}`
372
-
373
-
Here are the guidelines for checking if the PR is following the guidelines:
374
-
- The "statusCheckRollup" in the pull request details may help you to identify if the PR is following some of the guidelines (e.g. CLA compliance).
375
-
376
-
Here are the guidelines for the comment:
377
-
- **Be Polite and Helpful:** Start with a friendly tone.
378
-
- **Be Specific:** Clearly list only the sections from the contribution guidelines that are still missing.
379
-
- **Address the Author:** Mention the PR author by their username (e.g., `@username`).
380
-
- **Provide Context:** Explain *why* the information or action is needed.
381
-
- **Do not be repetitive:** If you have already commented on an PR asking for information, do not comment again unless new information has been added and it's still incomplete.
382
-
- **Identify yourself:** Include a bolded note (e.g. "Response from ADK Triaging Agent") in your comment to indicate this comment was added by an ADK Answering Agent.
383
-
384
-
**Example Comment for a PR:**
385
-
> **Response from ADK Triaging Agent**
386
-
>
387
-
> Hello @[pr-author-username], thank you for creating this PR!
388
-
>
389
-
> This PR is a bug fix, could you please associate the github issue with this PR? If there is no existing issue, could you please create one?
390
-
>
391
-
> In addition, could you please provide logs or screenshot after the fix is applied?
392
-
>
393
-
> This information will help reviewers to review your PR more efficiently. Thanks!
394
-
395
336
# 4. Steps
396
337
- If you are asked to find pull requests that need triaging, use `list_untriaged_pull_requests` first.
397
338
- For each pull request to be triaged:
398
339
- Call the `get_pull_request_details` tool to get the details of the PR.
399
-
- Skip the PR (i.e. do not label or comment) if any of the following is true:
340
+
- Skip the PR (i.e. do not label) if any of the following is true:
400
341
- the PR is closed
401
342
- the PR is labeled with "google-contributor"
402
343
- the PR is already labelled with the above labels (e.g. "documentation", "services", "tools", etc.).
403
-
- Check if the PR is following the contribution guidelines.
404
-
- If it's not following the guidelines, recommend or add a comment to the PR that points to the contribution guidelines (https://github.com/google/adk-python/blob/main/CONTRIBUTING.md).
405
-
- If it's following the guidelines, recommend or add a label to the PR.
344
+
- Recommend or add a label to the PR.
406
345
- After you add a component label, assign the component owner (the shepherd) to the PR:
407
346
- Call `assign_owner_to_pr` with the same label you applied.
408
347
- Skip assignment if the PR already has an assignee.
409
-
- If the tool reports the owner is not assignable, just note it; do not comment about it.
348
+
- If the tool reports the owner is not assignable, just note it.
410
349
411
350
# 5. Output
412
351
Present the following in an easy to read format highlighting PR number and your label.
413
352
- The PR summary in a few sentence
414
353
- The label you recommended or added with the justification
415
354
- The owner you assigned (or why you did not)
416
-
- The comment you recommended or added to the PR with the justification
0 commit comments