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
{{ message }}
Repository navigation
Commit 635a01f
Browse filesBrowse the repository at this point in the historyBrowse files
fix(sdk-watch): refresh an open issue once nothing is behind its target
Copilot on #5285: a group whose last outdated copy reached the target, or
that no manifest declares any more, was dropped before the refresh ran,
so its open issue kept stale **yes** rows and scope labels. Such a group
is now kept as settled: it files nothing and queues no analysis, but an
open issue for its target is rewritten to say nothing is behind, and the
scope labels its rows had called for are removed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
* @param {Record<string, string>} latest per package
285
+
* @returns {ReturnType<typeof markRows>}
286
+
* `null` when nothing is declared, a latest is unknown, or nothing is behind
287
+
*/
288
+
exportfunctiongroupState(group,rows,latest){
289
+
conststate=markRows(group,rows,latest);
290
+
returnstate&&state.rows.some((r)=>r.behind) ? state : null;
291
+
}
292
+
278
293
/** @param {NonNullable<ReturnType<typeof groupState>>} state */
279
294
exportfunctionbuildIssueTitle(state){
280
295
return`chore(deps): upgrade the ${state.group.label} to ${state.target}`;
@@ -406,12 +421,32 @@ export function buildIssueBody(state) {
406
421
)
407
422
.join("\n");
408
423
424
+
constheader=[
425
+
`| Package | Where | Declared | Installed on \`${TARGET_BRANCH}\` | Latest | Behind |`,
426
+
"| --- | --- | --- | --- | --- | --- |",
427
+
];
428
+
429
+
// Settled: the last copy that was behind has reached the target, or left
430
+
// the group, since the issue was filed (#5067).
431
+
if(!rows.some((r)=>r.behind)){
432
+
return[
433
+
buildMarker(group,target),
434
+
rows.length>0
435
+
? `**Nothing here is behind ${target} any more.** Every copy of the **${group.label}** installed on \`${TARGET_BRANCH}\` has reached it, so the upgrade this issue tracked is done.`
436
+
: `**Nothing here is behind ${target} any more.** No manifest on \`${TARGET_BRANCH}\` declares the **${group.label}** any longer, so the upgrade this issue tracked no longer applies.`,
"Rewritten by the nightly SDK watch (#4874) when the last outdated copy cleared. The sweep closes nothing: close this issue by hand once a maintainer has confirmed it.",
442
+
].join("\n");
443
+
}
444
+
409
445
return[
410
446
buildMarker(group,target),
411
447
`A new **${group.label}** release is out. What is installed on \`${TARGET_BRANCH}\` is behind what ${registry} publishes.`,
412
448
"",
413
-
`| Package | Where | Declared | Installed on \`${TARGET_BRANCH}\` | Latest | Behind |`,
0 commit comments