Skip to content

Commit 19a8cca

Browse files
Milos KotlarCopilot
andcommitted
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>
1 parent 94bc513 commit 19a8cca

2 files changed

Lines changed: 35 additions & 31 deletions

File tree

.github/workflows/needs-info-sweeper.agent.lock.yml

Lines changed: 19 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/needs-info-sweeper.agent.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
22
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.
78
89
on:
910
schedule: every 2d
@@ -47,9 +48,9 @@ safe-outputs:
4748
# Needs-Info Sweeper (machinelearning)
4849

4950
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`.
5152
- **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.
5354
- **noop** otherwise.
5455

5556
## Hard rules
@@ -58,10 +59,10 @@ Sweep open issues labeled `need info`. For each issue, decide one of:
5859
2. **Fixed wording.** Use the exact comment text below; do not paraphrase. Do not personalize.
5960
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.
6061
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.
6263
6. **Skip protected labels: `bug`, `Known Build Error`, `blocking-clean-ci`, `needs-author-action`.** These deserve different treatment.
6364
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`.
6566

6667
## Process
6768

@@ -72,12 +73,12 @@ For each open issue with label `need info`:
7273
gh api "/repos/dotnet/machinelearning/issues/<N>/timeline" --paginate \
7374
--jq '[.[] | select(.event == "labeled" and .label.name == "need info")] | last | .created_at'
7475
```
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`:
7677
```bash
7778
gh api "/repos/dotnet/machinelearning/issues/<N>/comments" --paginate \
78-
--jq '[.[] | select(.created_at > "<label_applied_at>") | .user.login] | unique'
79+
--jq '[.[] | select(.created_at > "<label_applied_at>") | .user.login]'
7980
```
80-
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.
8182
3. **Age check.** `age = now - label_applied_at`.
8283
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).
8384
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`:
9394

9495
```
9596
<!-- 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.
9798
9899
Posted by [`needs-info-sweeper`](https://github.com/dotnet/machinelearning/blob/main/.github/workflows/needs-info-sweeper.agent.md).
99100
```
100101

101-
**Close (day 30):**
102+
**Close (≥14 days after the nudge, and ≥30 days after the label was applied):**
102103

103104
```
104105
<!-- needs-info-sweeper:close -->
@@ -107,6 +108,8 @@ Closing for inactivity. Reopen with the requested details and we will take anoth
107108
Posted by [`needs-info-sweeper`](https://github.com/dotnet/machinelearning/blob/main/.github/workflows/needs-info-sweeper.agent.md).
108109
```
109110

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+
110113
## Tally
111114

112115
Append per-issue outcome to `/tmp/gh-aw/agent/sweep.txt`:

0 commit comments

Comments
 (0)