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
Copy file name to clipboardExpand all lines: scripts/update-issues.ts
+41-9Lines changed: 41 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -321,19 +321,51 @@ async function update() {
321
321
// web-features or if we change the format of the issue body.
322
322
if(dryRun){
323
323
console.log(`Dry run. Would update issue for ${id}.`);
324
-
continue;
324
+
}else{
325
+
console.log(`Updating issue for ${id}.`);
326
+
awaitoctokit.rest.issues.update({
327
+
...params,
328
+
issue_number: issue.number,
329
+
title,
330
+
body,
331
+
// Labels are not updated to avoid removing labels added manually.
332
+
});
325
333
}
326
-
console.log(`Updating issue for ${id}.`);
327
-
awaitoctokit.rest.issues.update({
328
-
...params,
329
-
issue_number: issue.number,
330
-
title,
331
-
body,
332
-
// Labels are not updated to avoid removing labels added manually.
333
-
});
334
334
}else{
335
335
console.log(`Issue for ${id} is up-to-date.`);
336
336
}
337
+
338
+
if(data.status.baseline){
339
+
// The feature has reached Baseline status since this issue was opened, so we should close it.
340
+
constcloseComment=dedent`
341
+
This feature reached Baseline status on ${dateFormat.format(newDate(data.status.baseline_low_date))}, which means it's now fully supported across browsers. Developer signals are no longer needed for this feature, so this issue can be closed.
342
+
343
+
Thank you to everyone who provided feedback! 🎉
344
+
`;
345
+
346
+
if(dryRun){
347
+
console.log(`Dry run. Would close issue for ${id} with comment.`);
348
+
}else{
349
+
console.log(`Closing issue for ${id} with comment.`);
0 commit comments