Skip to content

Commit d1c7784

Browse files
committed
feat(examples): customize 30-day inactivity comment for feature requests
1 parent a5f1f4e commit d1c7784

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

examples/workflows/issue-cleanup/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This document describes a workflow to batch-process and clean up older open issu
66

77
The Issue Cleanup workflow is designed to automate the triage of stale issues by using the Gemini CLI to:
88

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 it with the latest build. By default, it closes the inactive issue and tags any assignees to reopen it. However, if the issue is a high-priority (`p0` or `p1`), it leaves the issue open. This logic runs natively to save AI resources.
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 it with the latest build. For feature requests, it asks to reopen if still needed. By default, it closes the inactive issue and tags any assignees to reopen it. However, if the issue is a high-priority (`p0` or `p1`), it leaves the issue open. This logic runs natively to save AI resources.
1010
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.
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.

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,23 @@ jobs:
168168
return lowerName === 'priority/p0' || lowerName === 'priority/p1' || lowerName === 'p0' || lowerName === 'p1';
169169
});
170170
171-
let commentBody = `@${reporter}, this issue hasn't been updated in over a month. Could you please try reproducing it with the latest build? If it still occurs, please provide detailed reproduction steps.`;
171+
const isFeatureRequest = issue.labels.some(l => {
172+
const name = typeof l === 'string' ? l : l.name;
173+
const lowerName = name.toLowerCase();
174+
return lowerName.includes('feature') || lowerName.includes('enhancement');
175+
});
176+
177+
let commentBody = '';
178+
if (isFeatureRequest) {
179+
commentBody = `@${reporter}, this feature request hasn't been updated in over a month. Please reopen if this is still needed.`;
180+
} else {
181+
commentBody = `@${reporter}, this issue hasn't been updated in over a month. Could you please try reproducing it with the latest build? If it still occurs, please provide detailed reproduction steps.`;
182+
}
172183
173184
if (!isHighPriority) {
174185
if (hasAssignees) {
175186
commentBody += `\n\n${assigneeMentions}, please reopen if you are actively working on this.`;
176-
} else {
187+
} else if (!isFeatureRequest) {
177188
commentBody += ` Feel free to reopen this issue.`;
178189
}
179190
} else {

0 commit comments

Comments
 (0)