Hi Team, I have a query. Once the Provider publish...
# general
d
Hi Team, I have a query. Once the Provider publishes the verification results to Pactflow, Is there any feature in Pact for sending the notification like email, message or logs to Consumer? Or Consumer needs to login to the Pactflow account to see the status after verification result got published by Provider into Pactflow account? If any notification feature is available, Can you pls send me the link for the same.
m
see webhooks: https://docs.pact.io/pact_broker/webhooks (this applies whether or not you’re using PactFlow)
d
This webhook triggers the event again to verify the pact between consumer and provider still holds. What I want to know is whenever Provider publishes the verification results, will the consumer be notified with any notification like email?
m
no, there would be a lot of emails if that were the case. But there is a webhook for that and you can do what you wish with it
b
Usually we don't need notifications from Pact infrastructure directly, because we get other kinds of feedback (e.g. broken builds) if action is required.
☝️ 1
d
Ok.. So webhook is used to trigger the request automatically whenever there is a change in the Pact right?
b
Yeah, usually the change webhook would trigger a build on the other side of the contract.
m
what do you want the consumer to do with the information that a contract has been verified? (let’s start here and work backwards)
💡 1
d
We wanted to just inform the consumer whether the pact status is success or failure instead of Consumer logging into the Pact account and checking the status himself.
m
why do they need to know it passes? And follow up, when do they need to know?
If you have a PR that needs a result before it can be merged, you can use the webhook to send build status checks and unlock the merge button e.g. https://pactflow.io/blog/publishing-pact-verification-statuses-to-github/ (you can use that same webhook to send slack or other notifications too)
to @Boris’s point though, these things should be tied to your CI/build system
d
Let me go through Webhook in detail. Thanks for the info.
👍 1