Skip to content

Commit 3bbc49c

Browse files
1 parent 0029fd2 commit 3bbc49c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tools/spectral/ipa/metrics/scripts/getShouldRunMetricsRelease.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ export default async function getShouldRunMetricsRelease({ github, context }) {
2222

2323
const lastRunDate = new Date(runs[1].created_at);
2424
const today = new Date();
25-
const lastRunWasToday =
26-
today.getFullYear() === lastRunDate.getFullYear() &&
27-
today.getMonth() === lastRunDate.getMonth() &&
28-
today.getDate() === lastRunDate.getDate();
2925

30-
return previousStatus === 'failure' || !lastRunWasToday;
26+
return previousStatus === 'failure' || today.toDateString() !== lastRunDate.toDateString();
3127
}

0 commit comments

Comments
 (0)