|
1 | 1 | --- |
| 2 | +timeout-minutes: 5 |
| 3 | +name: Issue Triage Agent |
| 4 | + |
2 | 5 | on: |
3 | | - schedule: 0 14 * * 1-5 |
4 | | - workflow_dispatch: null |
| 6 | + issues: |
| 7 | + types: [opened, reopened] |
| 8 | + |
5 | 9 | permissions: |
6 | 10 | issues: read |
7 | | -imports: |
8 | | -- github/gh-aw/.github/workflows/shared/mood.md@852cb06ad52958b402ed982b69957ffc57ca0619 |
9 | | -- github/gh-aw/.github/workflows/shared/reporting.md@852cb06ad52958b402ed982b69957ffc57ca0619 |
10 | | -safe-outputs: |
11 | | - add-comment: {} |
12 | | - add-labels: |
13 | | - allowed: |
14 | | - - bug |
15 | | - - feature |
16 | | - - enhancement |
17 | | - - documentation |
18 | | - - question |
19 | | - - help-wanted |
20 | | - - good-first-issue |
21 | | -source: github/gh-aw/.github/workflows/issue-triage-agent.md@852cb06ad52958b402ed982b69957ffc57ca0619 |
22 | | -strict: true |
23 | | -timeout-minutes: 5 |
| 11 | + |
24 | 12 | tools: |
25 | 13 | github: |
26 | | - lockdown: false |
27 | | - toolsets: |
28 | | - - issues |
29 | | - - labels |
| 14 | + toolsets: [issues, labels] |
| 15 | + |
| 16 | +safe-outputs: |
| 17 | + add-labels: |
| 18 | + allowed: [bug, feature, enhancement, documentation, question, help-wanted, good-first-issue] |
| 19 | + add-comment: {} |
30 | 20 | --- |
| 21 | + |
31 | 22 | # Issue Triage Agent |
32 | 23 |
|
33 | | -List open issues in ${{ github.repository }} that have no labels. For each unlabeled issue, analyze the title and body, then add one of the allowed labels: `bug`, `feature`, `enhancement`, `documentation`, `question`, `help-wanted`, or `good-first-issue`, `community`. |
| 24 | +List open issues in ${{ github.repository }} that have no labels. For each |
| 25 | +unlabeled issue, analyze the title and body, then add one of the allowed |
| 26 | +labels: `bug`, `feature`, `enhancement`, `documentation`, `question`, |
| 27 | +`help-wanted`, or `good-first-issue`. |
34 | 28 |
|
35 | 29 | Skip issues that: |
36 | 30 | - Already have any of these labels |
37 | 31 | - Have been assigned to any user (especially non-bot users) |
38 | 32 |
|
39 | | -After adding the label to an issue, mention the issue author in a comment using this format (follow shared/reporting.md guidelines): |
40 | | - |
41 | | -**Comment Template**: |
42 | | -```markdown |
43 | | -### 🏷️ Issue Triaged |
44 | | - |
45 | | -Hi @{author}! I've categorized this issue as **{label_name}** based on the following analysis: |
46 | | - |
47 | | -**Reasoning**: {brief_explanation_of_why_this_label} |
48 | | - |
49 | | -<details> |
50 | | -<summary><b>View Triage Details</b></summary> |
51 | | - |
52 | | -#### Analysis |
53 | | -- **Keywords detected**: {list_of_keywords_that_matched} |
54 | | -- **Issue type indicators**: {what_made_this_fit_the_category} |
55 | | -- **Confidence**: {High/Medium/Low} |
56 | | - |
57 | | -#### Recommended Next Steps |
58 | | -- {context_specific_suggestion_1} |
59 | | -- {context_specific_suggestion_2} |
60 | | - |
61 | | -</details> |
62 | | - |
63 | | -**References**: [Triage run §{run_id}](https://github.com/github/gh-aw/actions/runs/{run_id}) |
64 | | -``` |
65 | | - |
66 | | -**Key formatting requirements**: |
67 | | -- Use h3 (###) for the main heading |
68 | | -- Keep reasoning visible for quick understanding |
69 | | -- Wrap detailed analysis in `<details>` tags |
70 | | -- Include workflow run reference |
71 | | -- Keep total comment concise (collapsed details prevent noise) |
72 | | - |
73 | | -## Batch Comment Optimization |
74 | | - |
75 | | -For efficiency, if multiple issues are triaged in a single run: |
76 | | -1. Add individual labels to each issue |
77 | | -2. Add a brief comment to each issue (using the template above) |
78 | | -3. Optionally: Create a discussion summarizing all triage actions for that run |
79 | | - |
80 | | -This provides both per-issue context and batch visibility. |
81 | | - |
82 | | -## Labels |
83 | | - |
84 | | -- `bug`: Indicates a problem or error in the code that needs fixing. |
85 | | -- `feature`: Represents a new feature request or enhancement to existing functionality. |
86 | | -- `enhancement`: Suggests improvements to existing features or code. |
87 | | -- `documentation`: Pertains to issues related to documentation, such as missing or unclear docs. |
88 | | -- `question`: Used for issues that are asking for clarification or have questions about the project. |
89 | | -- `help-wanted`: Indicates that the issue is a good candidate for external contributions and help |
90 | | -- `good-first-issue`: Marks issues that are suitable for newcomers to the project, often with simpler scope. |
91 | | -- `community`: Indicates that the issue is related to community engagement, such as events, discussions, or contributions that don't fit into the other categories. From authors who are not contributors to the codebase but are engaging with the project in other ways. |
| 33 | +Do research on the issue in the context of the codebase and, after |
| 34 | +adding the label to an issue, mention the issue author in a comment, explain |
| 35 | +why the label was added and give a brief summary of how the issue may be |
| 36 | +addressed. |
0 commit comments