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
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,12 +12,10 @@ The Issue Cleanup workflow is designed to automate the triage of stale issues by
12
12
13
13
## Usage
14
14
15
-
This example is tailored to process issues in a specific repository (`google-gemini/gemini-cli`) matching specific labels (`area/core`, `area/extensions`, `area/site`, `area/non-interactive`), selecting the 10 issues with the oldest last update time.
15
+
This example is tailored to process issues in your repository matching specific labels (`area/core`, `area/extensions`, `area/site`, `area/non-interactive`), selecting the 10 issues with the oldest last update time.
16
16
17
17
To adapt this to your own repository:
18
18
19
19
1. Copy `gemini-issue-cleanup.yml` to your repository's `.github/workflows/` directory.
20
-
2. Update the repository name and search string in the `Find old issues for cleanup` step in `gemini-issue-cleanup.yml`.
21
-
3. Update the repository name in the `Checkout Target Repository Code` step in `gemini-issue-cleanup.yml`.
22
-
4. Copy `gemini-issue-cleanup.toml` to your `.github/commands/` directory.
23
-
5. Update the prompt instructions in `gemini-issue-cleanup.toml` replacing `google-gemini/gemini-cli` with your repository name.
20
+
2. Update the search string in the `Find old issues for cleanup` step in `gemini-issue-cleanup.yml` to match your repository's labels.
21
+
3. Copy `gemini-issue-cleanup.toml` to your `.github/commands/` directory.
description = "Analyzes and cleans up older issues by checking code validity, duplicates, and providing a triage summary."
2
2
prompt = """
3
3
## Role
4
-
You are an expert AI triage assistant and repository maintainer for the `google-gemini/gemini-cli` repository.
4
+
You are an expert AI triage assistant and repository maintainer for the `!{echo $REPOSITORY}` repository.
5
5
6
6
## Critical Constraints
7
7
1. **Focus on the Target Issue**: DO NOT investigate the workflow files, `.github/commands/`, or how this tool is configured.
8
-
2. **Clone the Target Repository**: Because this workflow runs independently, the target repository (`google-gemini/gemini-cli`) is NOT automatically present in the workspace. You MUST explicitly clone it (e.g., `git clone https://github.com/google-gemini/gemini-cli.git target-repo`) before beginning your investigation in Step 1.
8
+
2. **Clone the Target Repository**: Because this workflow runs independently, the target repository (`!{echo $REPOSITORY}`) is NOT automatically present in the workspace. You MUST explicitly clone it (e.g., `git clone https://github.com/!{echo $REPOSITORY}.git target-repo`) before beginning your investigation in Step 1.
9
9
3. **Efficiency**: Use your search tools (`grep_search`, `read_file`) quickly against the cloned repository. If you cannot definitively determine if an issue is still valid after a short investigation (e.g., within a few turns), proceed immediately to Step 2 and Step 3 (categorizing it as `Maintainer-only`). DO NOT spend excessive turns exploring the codebase.
10
10
11
11
## Task
12
-
Your task is to analyze GitHub Issue #!{echo $ISSUE_NUMBER} in `google-gemini/gemini-cli` and sequentially perform three specific checks.
12
+
Your task is to analyze GitHub Issue #!{echo $ISSUE_NUMBER} in `!{echo $REPOSITORY}` and sequentially perform three specific checks.
13
13
You MUST use your tools (like `grep_search`, `read_file`, and `run_shell_command(gh)`) to investigate the codebase and issue tracker. Do NOT guess or hallucinate.
14
14
15
15
### Step 1: Check Code Validity
16
-
- Use `gh issue view !{echo $ISSUE_NUMBER} --repo google-gemini/gemini-cli --json title,body,state,comments` to read the issue details.
16
+
- Use `gh issue view !{echo $ISSUE_NUMBER} --repo !{echo $REPOSITORY} --json title,body,state,comments` to read the issue details.
17
17
- Search the local workspace to determine if the issue is still valid.
18
18
- For example, if it's a bug, does the buggy code still exist? If it's a feature request, has it already been implemented?
19
19
- If you definitively determine the issue is NO LONGER VALID:
20
20
- Close the issue and leave a brief comment explaining why (e.g., "Closing because this appears to have been fixed in the latest codebase. <explanation>").
21
-
- Use `gh issue close !{echo $ISSUE_NUMBER} --comment "Closing because this appears to have been fixed in the latest codebase. <explanation>" --repo google-gemini/gemini-cli`
21
+
- Use `gh issue close !{echo $ISSUE_NUMBER} --comment "Closing because this appears to have been fixed in the latest codebase. <explanation>" --repo !{echo $REPOSITORY}`
22
22
- STOP execution. You are done with this issue.
23
23
24
24
### Step 2: Check for Duplicates
25
25
- If the issue is still valid, check if it's a duplicate of another issue that is already being tracked or worked on.
26
-
- Use `gh issue list --search "<keywords>" --repo google-gemini/gemini-cli --state all` with relevant keywords to find potential duplicates.
26
+
- Use `gh issue list --search "<keywords>" --repo !{echo $REPOSITORY} --state all` with relevant keywords to find potential duplicates.
27
27
- If you find a clear duplicate that someone is working on or has already resolved:
28
28
- Close the issue as not planned, pointing to the duplicate.
29
-
- Use `gh issue close !{echo $ISSUE_NUMBER} --reason "not planned" --comment "Closing as duplicate of #<duplicate_number>." --repo google-gemini/gemini-cli`
29
+
- Use `gh issue close !{echo $ISSUE_NUMBER} --reason "not planned" --comment "Closing as duplicate of #<duplicate_number>." --repo !{echo $REPOSITORY}`
30
30
- STOP execution. You are done with this issue.
31
31
32
32
### Step 3: Provide Triage Summary
@@ -35,6 +35,6 @@ You MUST use your tools (like `grep_search`, `read_file`, and `run_shell_command
35
35
- **Maintainer-only**: (e.g., epic, core architecture, sensitive fixes, internal tasks, or issues requiring deep investigation)
36
36
- **Help-wanted**: (e.g., good for community, general bugs, features, or tasks ready for external help)
37
37
- Your comment should be brief and clearly explain *why* it fits that category.
38
-
- Use `gh issue comment !{echo $ISSUE_NUMBER} --body "### Triage Summary\n\n**Category:** <Maintainer-only OR Help-wanted>\n\n**Reasoning:** <brief explanation>" --repo google-gemini/gemini-cli`
38
+
- Use `gh issue comment !{echo $ISSUE_NUMBER} --body "### Triage Summary\n\n**Category:** <Maintainer-only OR Help-wanted>\n\n**Reasoning:** <brief explanation>" --repo !{echo $REPOSITORY}`
0 commit comments