Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow a different webhook to be used to send messages on build failures #76

Merged

Conversation

weedmapsmike
Copy link
Contributor

Checklist

  • I've read and followed the Contribution Guidelines
  • step.yml and README.md is updated with the changes (if needed)

Version

Requires a MAJOR/MINOR/PATCH version update

Context

When using a webhook to send slack messages, the channel in which the message is posted relies on the webhook's linked channel. This change allows a different channel to used to send messages to in the case of a failure, when webhooks are used and not an api token.

Changes

  • add a new optional field in the yml for adding a webhook to use when the build fails.
  • add a new property in the Config struct: WebhookURLOnError
  • use the WebhookURLOnError when there is an error and it is populated

Investigation details

  • this was the only solution I could think of to allow a different slack channel to be used when the build fails

Decisions

  • tried to follow what already existed

Copy link
Contributor

@ofalvai ofalvai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for the contribution @weedmapsmike 🚀

@ofalvai ofalvai merged commit d3ce902 into bitrise-steplib:master Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants