Skip to content

Commit

Permalink
add summary to nothing urgent hook
Browse files Browse the repository at this point in the history
  • Loading branch information
ggnine-jito committed Jan 8, 2024
1 parent 6963564 commit 2fb1f3f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions scripts/governance-notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,19 @@ export async function runNotifier() {
}
}

const summary = `countOpenForVotingSinceSomeTime: ${countOpenForVotingSinceSomeTime}, countJustOpenedForVoting: ${countJustOpenedForVoting}, countVotingNotStartedYet: ${countVotingNotStartedYet}, countClosed: ${countClosed}, countCancelled: ${countCancelled}`
if (!webhookTriggered && process.env.WEBHOOK_URL) {
console.log("Nothing to Report")
axios.post(process.env.WEBHOOK_URL, { content: 'Nothing to Report' })
console.log('Nothing urgent to Report')
axios
.post(process.env.WEBHOOK_URL, {
content: 'Nothing urgent to Report: ' + summary,
})
.then(() => {
console.log('Nothing Webhook Triggered')
})
}

console.log(
`-- countOpenForVotingSinceSomeTime: ${countOpenForVotingSinceSomeTime}, countJustOpenedForVoting: ${countJustOpenedForVoting}, countVotingNotStartedYet: ${countVotingNotStartedYet}, countClosed: ${countClosed}, countCancelled: ${countCancelled}`
)
console.log(summary)
}

errorWrapper()

0 comments on commit 2fb1f3f

Please sign in to comment.