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/gemini-issue-cleanup.toml
+53-5Lines changed: 53 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,65 @@ You are an automated triage bot for the `!{echo $REPOSITORY}` repository. Your j
4
4
5
5
## Critical Constraints
6
6
1. **NO META-ANALYSIS**: DO NOT read local files in the repository you are running in (like `package.json`, `README.md`, or `.github/`). Only read files within the `target-repo/` folder you clone in Step 1.
7
-
2. **EFFICIENCY**: If the issue is too vague, close it immediately and stop. Do not investigate code for vague issues.
7
+
2. **EFFICIENCY**: If the issue is too vague or inactive, close/comment immediately and stop. Do not investigate code.
8
8
9
9
## Task Lifecycle
10
10
11
-
### Step 1: Setup & Vagueness Check
11
+
### Step 1: Setup & Comment Analysis
12
12
- Run `git clone https://github.com/!{echo $REPOSITORY}.git target-repo`
- **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:
- Read the comments. Does the latest comment indicate that the issue has been fixed, resolved, or is functioning properly?
17
+
- If YES: `gh issue close !{echo $ISSUE_NUMBER} --comment "Closing because the latest comments indicate this issue has been resolved. Feel free to reopen if the problem persists." --reason "completed" --repo !{echo $REPOSITORY}`
18
+
- **STOP EXECUTION IMMEDIATELY**.
19
+
20
+
**Inactivity Check (Priority 2):**
21
+
- Is `!{echo $INACTIVE_OVER_30_DAYS}` equal to `true`?
22
+
- If YES (and it was not resolved above): Execute the following bash script exactly as written to handle the inactivity.
COMMENT="@${REPORTER}, this feature request hasn't been updated in over a month. Please reopen if this is still needed."
37
+
else
38
+
COMMENT="@${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."
39
+
fi
40
+
41
+
if [ "$IS_HIGH_PRIORITY" = "false" ]; then
42
+
if [ "$HAS_ASSIGNEES" = "true" ]; then
43
+
COMMENT="${COMMENT}\n\n${ASSIGNEE_MENTIONS}, please reopen if you are actively working on this."
44
+
elif [ "$IS_FEATURE" = "false" ]; then
45
+
COMMENT="${COMMENT} Feel free to reopen this issue."
46
+
fi
47
+
else
48
+
if [ "$HAS_ASSIGNEES" = "true" ]; then
49
+
COMMENT="${COMMENT}\n\n${ASSIGNEE_MENTIONS}, checking in on this high priority issue."
- If the issue is NOT inactive over 30 days: Is the issue description fundamentally missing context (no logs, no repro steps, just "it's broken") AND no one has asked for more information yet?
15
63
- 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}`
16
64
- **STOP EXECUTION IMMEDIATELY**.
17
-
- If the issue is clear or the reporter has provided info, proceed to Step 2.
65
+
- If the issue is clear, proceed to Step 2.
18
66
19
67
### Step 2: Reproduction & Code Validity Check
20
68
- 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.
commentBody = `@${reporter}, this feature request hasn't been updated in over a month. Please reopen if this is still needed.`;
268
-
} else {
269
-
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.`;
270
-
}
271
-
272
-
if (!isHighPriority) {
273
-
if (hasAssignees) {
274
-
commentBody += `\n\n${assigneeMentions}, please reopen if you are actively working on this.`;
275
-
} else if (!isFeatureRequest) {
276
-
commentBody += ` Feel free to reopen this issue.`;
277
-
}
278
-
} else {
279
-
if (hasAssignees) {
280
-
commentBody += `\n\n${assigneeMentions}, checking in on this high priority issue.`;
281
-
}
282
-
}
283
-
284
-
await github.rest.issues.createComment({
285
-
owner: context.repo.owner,
286
-
repo: context.repo.repo,
287
-
issue_number: issueNumber,
288
-
body: commentBody
289
-
});
290
-
291
-
if (!isHighPriority) {
292
-
await github.rest.issues.update({
293
-
owner: context.repo.owner,
294
-
repo: context.repo.repo,
295
-
issue_number: issueNumber,
296
-
state: 'closed',
297
-
state_reason: 'not_planned'
298
-
});
299
-
}
300
-
301
-
core.setOutput('is_stale', 'true');
201
+
core.setOutput('inactive_over_30_days', 'true');
202
+
core.setOutput('is_stale', 'false'); // Let AI handle it
CUSTOM_INSTRUCTIONS: 'State whether the issue should be categorized as **Maintainer-only** (epic, core architecture, sensitive fixes, internal tasks, or issues requiring deep investigation) or **Help-wanted** (good for community, general bugs, features, or tasks ready for external help). Your comment should be brief and clearly explain *why* it fits that category.'
0 commit comments