semantic-release-slack-bot
semantic-release-slack-bot copied to clipboard
feat: allow onSuccessFunction/onFailFunction to be a promise
Hi,
Thanks for a great SR plug-in 🙏
It is seeing heavy usage in a corporate environment I work in, where I also ran into the issue that I'd like to asynchronously build the template using this library. However if for instance onSuccessFunction
is a Promise, the slackMessage
isn't awaited, resulting in a Promise { <pending> }
being offered to the Slack API and of course this results in SemanticReleaseError: invalid_payload
.
await Promise.resolve()
wrappers for both onSuccessFunction
& onFailFunction
should allow us to input both Promises and sync functions.
If you have any thoughts please let me know!