ropensci-org / badges

Badges for packages in rOpenSci software peer-review
3 stars 0 forks source link

Send failure notifications to multiple people #17

Closed mpadge closed 5 months ago

mpadge commented 5 months ago

Current script recently started failing, requiring fix in https://github.com/ropensci-org/badges/commit/8952f9ccf5f041a0187d1e5602a9a3dec2961feb. The failure notifications were only delivered to me as author of the issue. https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/notifications-for-workflow-runs:

Notifications for scheduled workflows are sent to the user who initially created the workflow. If a different user updates the cron syntax in the workflow file, subsequent notifications will be sent to that user instead. If a scheduled workflow is disabled and then re-enabled, notifications will be sent to the user who re-enabled the workflow rather than the user who last modified the cron syntax.

There is currently no direct way for others to receive workflow failure notifications. The easiest viable work-around would seem to be to add an additional workflow step with if: ${{ failure() }} to then send an email to additional people. @maelle Would that be okay for you? The failures are quite loud here, as the workflow runs four times a day https://github.com/ropensci-org/badges/blob/8952f9ccf5f041a0187d1e5602a9a3dec2961feb/.github/workflows/badges.yml#L9

maelle commented 5 months ago

I'd prefer to be mentioned in an issue, if possible.

mpadge commented 5 months ago

Yeah, i know ... there's no easy way to do that at present. I'll write an extra script to open an issue and ping you, and then trigger that script on if: ${{ failure() }}.

maelle commented 5 months ago

could it be an issue that's reopened/closed like what there's here: https://github.com/r-hub/cransays/blob/de5822e7cfb8fae162172993a917d7ba2862cdae/.github/workflows/render-dashboard.yml#L89

mpadge commented 5 months ago

I think the lines added in that commit should be all that is needed: https://github.com/ropensci-org/badges/blob/f48b63edf4199622404ef1b5ae6d87869eccf255/.github/workflows/badges.yml#L45-L47

We should probably document this somewhere now ...?