Skip to content

Commit e48c979

Browse files
committed
Also report on unpublished drafts
1 parent f712ceb commit e48c979

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/report.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ async function fetchSecurityReports() {
2626
const now = Date.now();
2727
const newReports = [];
2828
const needTriage = [];
29+
const drafts = [];
2930

3031
for (const advisory of advisories) {
3132
const createdAt = new Date(advisory.created_at).getTime();
@@ -36,6 +37,8 @@ async function fetchSecurityReports() {
3637
newReports.push(advisory);
3738
} else if (advisory.state === 'triage') {
3839
needTriage.push(advisory);
40+
} else if (advisory.state === 'draft') {
41+
drafts.push(advisory);
3942
}
4043
}
4144

@@ -59,6 +62,9 @@ async function fetchSecurityReports() {
5962
? needTriage.map(advisoryListItem).join('\n')
6063
: 'All reports triaged! ✅',
6164
},
65+
...(drafts.length
66+
? [{ name: 'Unpublished drafts', value: drafts.map(advisoryListItem).join('\n') }]
67+
: []),
6268
],
6369
});
6470
} catch (error) {

0 commit comments

Comments
 (0)