Skip to content

Commit

Permalink
Skip posting of update if there is no update to post about (#5344)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb authored Jan 24, 2025
1 parent afefe4d commit 0fad9ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions automations/js/src/last_week_tonight.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ for (const repo of repos) {
if (closedIssues.length || mergedPrs.length)
reportData.push({ repo, closedIssues, mergedPrs })
}
if (!reportData.length) {
console.log("Nothing to post about, exiting.")
process.exit(0)
}

const res = await postActivities(reportData)
if (res.status !== 201) {
Expand Down

0 comments on commit 0fad9ae

Please sign in to comment.