Skip to content

Commit f28380b

Browse files
authored
Merge pull request cli#12677 from cli/kw/use-shared-triage-workflows
Migrate issue triage workflows to shared workflows
2 parents 8d819c5 + e1983ce commit f28380b

9 files changed

Lines changed: 118 additions & 179 deletions

File tree

.github/workflows/feature-request-comment.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/issueauto.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/scripts/spam-detection/eval-prompts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ testData:
918918
919919
We have an automation to nudge on issues waiting for user info (like after one week), and close the issue if there's no further activity (like after one more week).
920920
921-
- Automatically add the stale label to issues labelled needs-user-input after 30 days of inactivity. When the stale label is added, also post a comment to the issue explaining what this means: the issue will close after 30 days of inactivity; contributors can comment on the issue to remove the stale label and keep it open. Maintainers can also add the keep label to make the stale automation ignore that issue.
921+
- Automatically add the stale label to issues labelled more-info-needed after 30 days of inactivity. When the stale label is added, also post a comment to the issue explaining what this means: the issue will close after 30 days of inactivity; contributors can comment on the issue to remove the stale label and keep it open. Maintainers can also add the keep label to make the stale automation ignore that issue.
922922
- Automatically close issues labelled stale after they have been stale for 30 days. When the issue is closed, add a comment explaining why this happened. Encourage them to leave a comment if the close was done in error.
923923
- The above automation should only act on new issues after the date of the automation's implementation.
924924
</BODY>

.github/workflows/stale-issues.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Process Discuss Label
2+
run-name: ${{ github.event_name == 'issues' && github.event.issue.title || github.event.pull_request.title }}
3+
permissions: {}
4+
on:
5+
issues:
6+
types:
7+
- labeled
8+
# pull_request_target (not pull_request) to access secrets for fork PRs.
9+
# Safe: no PR code is checked out or executed.
10+
pull_request_target:
11+
types:
12+
- labeled
13+
14+
jobs:
15+
discuss:
16+
if: github.event.action == 'labeled' && github.event.label.name == 'discuss'
17+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-discuss.yml@main
18+
with:
19+
target_repo: 'github/cli'
20+
cc_team: '@github/cli'
21+
environment: cli-discuss-automation
22+
secrets:
23+
discussion_token: ${{ secrets.CLI_DISCUSSION_TRIAGE_TOKEN }}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Issue Triaging
2+
on:
3+
issues:
4+
types: [opened, reopened, labeled, unlabeled, closed]
5+
6+
jobs:
7+
label-incoming:
8+
if: github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'unlabeled'
9+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-label-incoming.yml@main
10+
permissions:
11+
issues: write
12+
13+
close-invalid:
14+
if: github.event.action == 'labeled'
15+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-close-invalid.yml@main
16+
permissions:
17+
contents: read
18+
issues: write
19+
pull-requests: write
20+
21+
close-suspected-spam:
22+
if: github.event.action == 'labeled'
23+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-close-suspected-spam.yml@main
24+
permissions:
25+
issues: write
26+
27+
close-single-word:
28+
if: github.event.action == 'opened'
29+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-close-single-word-issues.yml@main
30+
permissions:
31+
issues: write
32+
33+
close-off-topic:
34+
if: github.event.action == 'labeled'
35+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-close-off-topic.yml@main
36+
permissions:
37+
issues: write
38+
39+
enhancement-comment:
40+
if: github.event.action == 'labeled'
41+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-enhancement-comment.yml@main
42+
permissions:
43+
issues: write
44+
45+
unable-to-reproduce:
46+
if: github.event.action == 'labeled'
47+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-unable-to-reproduce-comment.yml@main
48+
permissions:
49+
issues: write
50+
51+
remove-needs-triage:
52+
if: github.event.action == 'labeled'
53+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-remove-needs-triage.yml@main
54+
permissions:
55+
issues: write
56+
57+
on-issue-close:
58+
if: github.event.action == 'closed'
59+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-on-issue-close.yml@main
60+
permissions:
61+
issues: write
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Triage Scheduled Tasks
2+
on:
3+
workflow_dispatch:
4+
issue_comment:
5+
types: [created]
6+
schedule:
7+
- cron: '5 * * * *' # Hourly — no-response close
8+
- cron: '0 3 * * *' # Daily at 3 AM UTC — stale issues
9+
10+
jobs:
11+
no-response:
12+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-no-response-close.yml@main
13+
permissions:
14+
issues: write
15+
16+
stale:
17+
if: github.event.schedule == '0 3 * * *'
18+
uses: desktop/gh-cli-and-desktop-shared-workflows/.github/workflows/triage-stale-issues.yml@main
19+
with:
20+
days_before_stale: 30
21+
days_before_close: -1
22+
start_date: '2025-07-10T00:00:00Z'
23+
stale_issue_label: 'stale'
24+
exempt_issue_labels: 'keep'
25+
permissions:
26+
issues: write

.github/workflows/triage.yml

Lines changed: 0 additions & 74 deletions
This file was deleted.

docs/triage.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ For bugs, the FR should engage with the issue and community with the goal to rem
1414

1515
To be considered triaged, `bug` issues require the following:
1616

17-
- A severity label `p1`, `p2`, and `p3`
17+
- A severity label `priority-1`, `priority-2`, and `priority-3`
1818
- Clearly defined Acceptance Criteria, added to the Issue as a standalone comment (see [example](https://github.com/cli/cli/issues/9469#issuecomment-2292315743))
1919

2020
#### Bug severities
2121

2222
| Severity | Description |
2323
| - | - |
24-
| `p1` | Affects a large population and inhibits work |
25-
| `p2` | Affects more than a few users but doesn't prevent core functions |
26-
| `p3` | Affects a small number of users or is largely cosmetic |
24+
| `priority-1` | Affects a large population and inhibits work |
25+
| `priority-2` | Affects more than a few users but doesn't prevent core functions |
26+
| `priority-3` | Affects a small number of users or is largely cosmetic |
2727

2828
### Enhancements and Docs
2929

@@ -36,10 +36,10 @@ When a new issue is opened, the FR **should**:
3636
- Ensure there is enough information to understand the enhancement's scope and value
3737
- Ask the user for more information about value and use-case, if necessary
3838
- Leave the `needs-triage` label on the issue
39-
- Add the `needs-user-input` and `needs-investigation` labels as needed
39+
- Add the `more-info-needed` and `needs-investigation` labels as needed
4040

4141
When the FR has enough information to be triaged, they should:
42-
- Remove the `needs-user-input` and `needs-investigation` labels
42+
- Remove the `more-info-needed` and `needs-investigation` labels
4343
- Remove their assignment from the issue
4444

4545
The FR should **avoid**:
@@ -57,7 +57,7 @@ The FR can consider adding any of the following labels below.
5757
| - | - |
5858
| `discuss` | Some issues require discussion with the internal team. Adding this label will automatically open up an internal discussion with the team to facilitate this discussion. |
5959
| `core` | Defines what we would like to do internally. We tend to lean towards `help wanted` by default, and adding `core` should be reserved for trickier issues or implementations we have strong opinions/preferences about. |
60-
| `needs-user-input` | After asking any contributors for more information, add this label so it is clear that the issue has been responded to and we are waiting on the user. |
60+
| `more-info-needed` | After asking any contributors for more information, add this label so it is clear that the issue has been responded to and we are waiting on the user. |
6161
| `needs-investigation` | Used when the issue requires further investigation before it can be reviewed and triaged. This is often used for issues that are not clearly bugs or enhancements, or when the FR needs to gather more information before proceeding. |
6262
| `invalid` | Added to spam and abusive issues. |
6363

0 commit comments

Comments
 (0)