Skip to content

Commit 5691336

Browse files
labudisCopilot
andcommitted
Add auto-close spam, coding agent suitability, labels toolset
- Add close-issue safe output to auto-close spam as not_planned - Apply invalid/spam label to spam issues - Apply needs-info/question label to incomplete issues - Add coding agent suitability assessment (Suitable/Needs more info/Not suitable) - Replace gh label list bash with labels toolset for richer metadata - Update Step 4 with close_issue action Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9582067 commit 5691336

1 file changed

Lines changed: 23 additions & 5 deletions

File tree

workflows/issue-triage.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ safe-outputs:
2525
add-comment:
2626
set-issue-type:
2727
max: 1
28+
close-issue:
29+
target: "triggering"
30+
state-reason: "not_planned"
31+
max: 1
2832

2933
tools:
3034
web-fetch:
3135
github:
32-
toolsets: [issues]
36+
toolsets: [issues, labels]
3337
min-integrity: none # This workflow is allowed to examine and comment on any issues
3438

3539
timeout-minutes: 10
@@ -47,18 +51,23 @@ Do not make assumptions beyond what the issue content supports. Do not invent mi
4751

4852
1. Retrieve the issue content using the `get_issue` tool.
4953
2. Fetch any comments on the issue using the `get_issue_comments` tool.
50-
3. Fetch the list of labels available in this repository using `gh label list`.
54+
3. Fetch the list of labels available in this repository using the `list_labels` tool.
5155
4. Search for similar issues using the `search_issues` tool.
5256

5357
## Step 2: Spam and quality check
5458

55-
**Spam and invalid issues:** If the issue is obviously spam, bot-generated, gibberish, or a test issue, add a one-sentence comment explaining why and exit the workflow. Do not apply metadata to these issues.
59+
**Spam and invalid issues:** If the issue is obviously spam, bot-generated, gibberish, or a test issue:
60+
- Add a one-sentence comment explaining why.
61+
- Apply the `invalid` or `spam` label if one exists in the repository.
62+
- Close the issue as "not planned."
63+
- Do not apply any other metadata. Exit the workflow.
5664

5765
**Incomplete issues:** If the issue lacks enough detail for meaningful triage, add a comment that politely asks the author to provide the missing information:
5866
- For bugs: steps to reproduce, expected vs actual behavior, logs/errors, environment details.
5967
- For other issue types: equivalent details that would make the report actionable.
68+
- Apply a `needs-info` or `question` label if one exists in the repository.
6069

61-
Be specific about what is missing and why it is needed. Do not attempt to apply labels, type, or fields to incomplete issues.
70+
Be specific about what is missing and why it is needed. Do not attempt to apply type or other labels to incomplete issues.
6271

6372
If the issue has sufficient detail, proceed to Step 3.
6473

@@ -95,7 +104,14 @@ If the issue has sufficient detail, proceed to Step 3.
95104
- If a high-confidence duplicate is found and the repository has a `duplicate` label, apply it.
96105
- If no similar issues are found, state that explicitly in your report.
97106

98-
### 3e: Additional analysis
107+
### 3e: Assess coding agent suitability
108+
109+
Assess whether the issue is suitable for automated coding agent assignment:
110+
- **Suitable**: clear requirements, sufficient context, well-defined success criteria, self-contained scope.
111+
- **Needs more info**: potentially suitable but missing details needed to start.
112+
- **Not suitable**: requires investigation, design decisions, extensive coordination, or policy/architectural choices.
113+
114+
### 3f: Additional analysis
99115

100116
- Write notes, debugging strategies, and/or reproduction steps relevant to the issue.
101117
- Search the web for relevant documentation, error messages, or known solutions if applicable.
@@ -107,6 +123,7 @@ If the issue has sufficient detail, proceed to Step 3.
107123
Apply all triage results:
108124
- Use `set_issue_type` to set the issue type (if determined).
109125
- Use `update_issue` to apply labels.
126+
- Use `close_issue` to close the issue if it is spam (state reason: "not planned").
110127
- Add an issue comment with your triage report using the format below.
111128

112129
## Comment format
@@ -125,6 +142,7 @@ Use this structure for the triage comment. Use collapsed sections to keep it tid
125142
| **Type** | [value or "unchanged"] | [brief] |
126143
| **Labels** | [values or "none"] | [brief] |
127144
| **[Field name]** | [value] | [brief] |
145+
| **Coding agent** | [Suitable / Needs more info / Not suitable] | [brief] |
128146

129147
### 🔗 Similar issues
130148

0 commit comments

Comments
 (0)