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
Copy file name to clipboardExpand all lines: examples/workflows/issue-cleanup/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ This document describes a workflow to batch-process and clean up older open issu
6
6
7
7
The Issue Cleanup workflow is designed to automate the triage of stale issues by using the Gemini CLI to:
8
8
9
-
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 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.
9
+
1.**Check for Staleness and Age (Native)**: Identifies if an issue has been waiting for reporter feedback for over 7 days, closing it if so. If the 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. This is handled via a native GitHub Action script to save AI resources.
10
+
2.**Check for Vagueness (AI)**: If an issue is not stale or old but lacks sufficient information (e.g., reproduction steps), the agent asks the reporter for specific details and stops.
11
11
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.
12
12
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.
13
13
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.
- **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? If so, please provide detailed reproduction steps." --repo !{echo $REPOSITORY}`
- **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:
18
15
- 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}`
19
16
- **STOP EXECUTION IMMEDIATELY**.
20
-
- If the issue is clear, recent, or the reporter has provided info, proceed to Step 2.
17
+
- If the issue is clear or the reporter has provided info, proceed to Step 2.
21
18
22
19
### Step 2: Reproduction & Code Validity Check
23
20
- 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.
Copy file name to clipboardExpand all lines: examples/workflows/issue-cleanup/gemini-issue-cleanup.yml
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -125,6 +125,23 @@ jobs:
125
125
}
126
126
}
127
127
}
128
+
129
+
// Check overall issue age / inactivity
130
+
const lastUpdateDaysAgo = (new Date() - new Date(issue.updated_at)) / (1000 * 60 * 60 * 24);
131
+
console.log(`Issue was last updated ${lastUpdateDaysAgo.toFixed(1)} days ago.`);
132
+
133
+
if (lastUpdateDaysAgo > 30) {
134
+
console.log(`Issue has been inactive for over a month. Asking for repro.`);
135
+
await github.rest.issues.createComment({
136
+
owner: context.repo.owner,
137
+
repo: context.repo.repo,
138
+
issue_number: issueNumber,
139
+
body: `@${reporter}, 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? If so, please provide detailed reproduction steps.`
0 commit comments