Skip to content

Commit 0fad9ae

Browse files
authored
Skip posting of update if there is no update to post about (#5344)
1 parent afefe4d commit 0fad9ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

automations/js/src/last_week_tonight.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ for (const repo of repos) {
184184
if (closedIssues.length || mergedPrs.length)
185185
reportData.push({ repo, closedIssues, mergedPrs })
186186
}
187+
if (!reportData.length) {
188+
console.log("Nothing to post about, exiting.")
189+
process.exit(0)
190+
}
187191

188192
const res = await postActivities(reportData)
189193
if (res.status !== 201) {

0 commit comments

Comments
 (0)