klothoplatform / slack-notifier

Slack notification bot
MIT License
3 stars 0 forks source link

don't post notifications for draft PRs #19

Closed ghost closed 2 years ago

ghost commented 2 years ago

If event.pull_request.draft is true, then ignore it.

gordon-klotho commented 2 years ago

It might still be worth posting, just making it abundantly clear in the message that it's draft. Maybe configurable (once there's a mechanism for configuration)

ghost commented 2 years ago

I'm pretty sure github disables notifications while a PR is in draft mode (for email notifications, etc), so that would be nice to emulate, I think. But there is a pull_request.ready_for_review webhook, so we could easily send a message at the end saying "PR is now ready" (as I did manually in slack).

Question to you: do you think you'd want a notification on each push, or just that one at the end?

gordon-klotho commented 2 years ago

My ideal: start the thread on post no updates for commits or comments while it's still in draft mode, then the "now ready" message and process it normally.