Skip to content

Commit d0904f5

Browse files
committed
feat(examples): add 1-month age check for issue cleanup
1 parent d572273 commit d0904f5

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

examples/workflows/issue-cleanup/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This document describes a workflow to batch-process and clean up older open issu
77
The Issue Cleanup workflow is designed to automate the triage of stale issues by using the Gemini CLI to:
88

99
1. **Check for Staleness (Native)**: Identifies if an issue has been waiting for reporter feedback for over 7 days. If so, it closes the issue directly via a GitHub Action script to save AI resources.
10-
2. **Check for Vagueness (AI)**: If an issue is not stale but lacks sufficient information (e.g., reproduction steps), the agent asks the reporter for specific details and stops.
10+
2. **Check for Age and Vagueness (AI)**: If an issue is not stale but hasn't been updated in over a month, it asks the reporter to reproduce the issue with the latest build. If the issue lacks sufficient information (e.g., reproduction steps), it asks the reporter for specific details and stops.
1111
3. **Check Code Validity (AI)**: Determines if an issue is still relevant against the current codebase. The agent may attempt to write and execute a minimal reproduction script to verify if a bug has been resolved, or manually inspect the code. If verified as fixed, it will close the issue with an explanation.
1212
4. **Find Duplicates (AI)**: Checks if the issue has a more recent duplicate. If a duplicate exists, it closes the issue and links to the duplicate.
1313
5. **Summarize for Triage (AI)**: If an issue is still valid and unique, it provides a summary comment based on customizable instructions (e.g., categorizing it as `Maintainer-only` or `Help-wanted`). If no custom instructions are provided, it falls back to a standard triage summary.

examples/workflows/issue-cleanup/gemini-issue-cleanup.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ You are an automated triage bot for the `!{echo $REPOSITORY}` repository. Your j
88
99
## Task Lifecycle
1010
11-
### Step 1: Setup & Vagueness Check
11+
### Step 1: Setup, Age & Vagueness Check
1212
- Run `git clone https://github.com/!{echo $REPOSITORY}.git target-repo`
13-
- Run `gh issue view !{echo $ISSUE_NUMBER} --repo !{echo $REPOSITORY} --json title,body,author,comments`
13+
- Run `gh issue view !{echo $ISSUE_NUMBER} --repo !{echo $REPOSITORY} --json title,body,author,comments,updatedAt`
14+
- **Age Check**: If the issue was last updated over 1 month ago (compare `updatedAt` to the current `date`):
15+
- Ask the reporter: `gh issue comment !{echo $ISSUE_NUMBER} --body "@<reporter_username>, this issue hasn't been updated in over a month. Could you please try reproducing it with the latest build and let us know if it still occurs?" --repo !{echo $REPOSITORY}`
16+
- **STOP EXECUTION IMMEDIATELY**.
1417
- **Vagueness Check**: If the issue description is fundamentally missing context (no logs, no repro steps, just "it's broken") AND no one has asked for more information yet:
1518
- Ask the reporter: `gh issue comment !{echo $ISSUE_NUMBER} --body "@<reporter_username>, thank you for the report! Could you please provide more specific details (e.g., reproduction steps, expected behavior, and environment)? Closing this as vague if no response is received in a week." --repo !{echo $REPOSITORY}`
1619
- **STOP EXECUTION IMMEDIATELY**.
17-
- If the issue is clear or the reporter has provided info, proceed to Step 2.
20+
- If the issue is clear, recent, or the reporter has provided info, proceed to Step 2.
1821
1922
### Step 2: Reproduction & Code Validity Check
2023
- If the issue describes a reproducible bug (e.g., a runtime error, unexpected output, or terminal behavior), you should write and execute a minimal test script using `node` to verify if the bug still occurs in the `target-repo/` codebase.

0 commit comments

Comments
 (0)