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
Address code-review feedback on needs-info-sweeper
- Align description with every-2-day cadence.
- Tighten reply-check rule with explicit non-bot, non-labeler logic.
- Update nudge wording so the 14-day close window is consistent with the 30-day age gate.
- Note that close_issue safe-output sets state=closed (reason 'completed'); 'not planned' is not exposed by the schema.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: .github/workflows/needs-info-sweeper.agent.md
+16-13Lines changed: 16 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
1
---
2
2
description: |
3
-
3 times per week. Sweeps open issues labeled `need info`. Removes the
4
-
label when the original requester (or maintainer) has replied since the
5
-
label was applied. Nudges silent issues at 14 days. Closes silent
6
-
issues as `not planned` at 30 days. Fixed wording, capped output.
3
+
Runs every 2 days. Sweeps open issues labeled `need info`. Removes the
4
+
label when anyone other than the labeler has commented since the label
5
+
was applied. Nudges silent issues at 14 days. Closes silent issues at
6
+
30 days, but only if a previous nudge from this workflow is on the
7
+
thread. Fixed wording, capped output.
7
8
8
9
on:
9
10
schedule: every 2d
@@ -47,9 +48,9 @@ safe-outputs:
47
48
# Needs-Info Sweeper (machinelearning)
48
49
49
50
Sweep open issues labeled `need info`. For each issue, decide one of:
50
-
-**reply received** -> remove `need info`.
51
+
-**reply received**(anyone other than the labeler commented since the label was applied) -> remove `need info`.
51
52
-**silent 14d** -> post the nudge comment.
52
-
-**silent 30d AND previously nudged by this workflow** -> post the close comment, then close as `not planned`.
53
+
-**silent 30d AND previously nudged by this workflow at least 14 days ago** -> post the close comment, then close the issue.
53
54
-**noop** otherwise.
54
55
55
56
## Hard rules
@@ -58,10 +59,10 @@ Sweep open issues labeled `need info`. For each issue, decide one of:
58
59
2.**Fixed wording.** Use the exact comment text below; do not paraphrase. Do not personalize.
59
60
3.**Caps per run: 30 nudges, 15 closes, 30 label removals. Total comment budget = 50 (nudges + closes).** On any cap, stop that action and continue the others.
60
61
4.**Idempotency.** Every comment includes `<!-- needs-info-sweeper:<event> -->` where `<event>` is `nudge` or `close`. Skip a comment if the most recent bot comment on the issue carries the same marker.
61
-
5.**Reason `not planned` when closing.**
62
+
5.**Reply check definition.** "Reply received" means at least one comment on the issue, created after `label_applied_at`, from a user whose login is not the labeler and is not a bot (`[bot]` suffix). Bot comments and the labeler's own comments do not count as replies.
62
63
6.**Skip protected labels: `bug`, `Known Build Error`, `blocking-clean-ci`, `needs-author-action`.** These deserve different treatment.
63
64
7.**Skip issues whose `need info` label was applied less than 14 days ago.** The clock starts at the label event.
64
-
8.**Never close without prior nudge from this workflow.** If `age >= 30d` but no prior bot comment carries `<!-- needs-info-sweeper:nudge -->`, downgrade to a nudge (post the nudge comment, do NOT close). Closure requires the issue to have been nudged at least 14 days earlier by this workflow.
65
+
8.**Never close without prior nudge from this workflow.** If `age >= 30d` but no prior bot comment carries `<!-- needs-info-sweeper:nudge -->`, downgrade to a nudge (post the nudge comment, do NOT close). Closure requires the issue to have been nudged at least 14 days earlier by this workflow, i.e. closure happens at `age >= 30d` AND `nudged_at` exists AND `(now - nudged_at) >= 14d`.
65
66
66
67
## Process
67
68
@@ -72,12 +73,12 @@ For each open issue with label `need info`:
72
73
gh api "/repos/dotnet/machinelearning/issues/<N>/timeline" --paginate \
73
74
--jq '[.[] | select(.event == "labeled" and .label.name == "need info")] | last | .created_at'
74
75
```
75
-
2.**Reply check.**Was there a comment from anyone other than the labeler since `label_applied_at`?
76
+
2.**Reply check (rule 5).**Find comments created after `label_applied_at`:
76
77
```bash
77
78
gh api "/repos/dotnet/machinelearning/issues/<N>/comments" --paginate \
If yes (and at least one is not a bot or the labeler): remove `need info`, stop.
81
+
If any login in the result is **not** the labeler AND does **not** end in `[bot]`: remove `need info`, stop.
81
82
3.**Age check.**`age = now - label_applied_at`.
82
83
4.**Locate last bot marker.** Find the most recent bot comment carrying `<!-- needs-info-sweeper:nudge -->`; record its `created_at` as `nudged_at` (or null if absent).
83
84
5. If `14d <= age < 30d` AND `nudged_at` is null: post the nudge comment.
@@ -93,12 +94,12 @@ For each open issue with label `need info`:
93
94
94
95
```
95
96
<!-- needs-info-sweeper:nudge -->
96
-
Friendly nudge. Please share the missing details (minimal repro, environment, exact error) so we can investigate. We'll close this in 14 days if there's no response.
97
+
Friendly nudge. Please share the missing details (minimal repro, environment, exact error) so we can investigate. This issue will be closed if there is no response in 14 days.
97
98
98
99
Posted by [`needs-info-sweeper`](https://github.com/dotnet/machinelearning/blob/main/.github/workflows/needs-info-sweeper.agent.md).
99
100
```
100
101
101
-
**Close (day 30):**
102
+
**Close (≥14 days after the nudge, and ≥30 days after the label was applied):**
102
103
103
104
```
104
105
<!-- needs-info-sweeper:close -->
@@ -107,6 +108,8 @@ Closing for inactivity. Reopen with the requested details and we will take anoth
107
108
Posted by [`needs-info-sweeper`](https://github.com/dotnet/machinelearning/blob/main/.github/workflows/needs-info-sweeper.agent.md).
108
109
```
109
110
111
+
Note: the `close_issue` safe-output transitions the issue to `closed` (state `completed`). Setting the close-reason to `not planned` is not supported by the safe-outputs schema; that is fine, the close comment makes the inactivity reason explicit.
112
+
110
113
## Tally
111
114
112
115
Append per-issue outcome to `/tmp/gh-aw/agent/sweep.txt`:
0 commit comments