Hi
I am trying to ensure that if our build fails we get notified by slack BUT only for our main branch.
Here is our code for the slack notification:
hooks:
on_fail:
steps:
notify:
image: codefresh/slacknotifier
environment:
- SLACK_HOOK_URL=<webhook url>
- SLACK_ATTACHMENTS=<slack message>
when:
branch:
only:
- /^(main)/i
At the minute it is still slacking for feature branches. Any assistance would be greatly appreciated.