Hi, I have a quick API question. I was looking at ...
# pactflow
t
Hi, I have a quick API question. I was looking at the docs and was wondering what the API resource to get this response: https://docs.pactflow.io/docs/bi-directional-contract-testing/compatibility-checks#api-resources I ultimately am looking to populate the response from the crossContractVerificationResults as a GitHub PR comment if the cross contract verification fails. I found this: https://smartbear.portal.swaggerhub.com/pactflow/default/pactflow_saas_api?_gl=1*1wb6kaf*_gcl_au*OTg4MTA0MjM0LjE3Mzc1NjExMzA.#/can-i-de[…]n-i-deploy but no mention of crossContractVerificationResults here
m
I don’t believe this API is publicly documented
Probably what you want is a webhook that fires when the comparison is run with the info
how/when do you plan on calling the API?
t
Ah okay, my current thought on the flow is publish -> can-i-deploy -> if can-i-deploy fails call the API to get the crossContractVerificationResults -> post those results as a comment on the PR. I have not fully gone through the Webhook docs yet but I don't see any event type for a cross contract verification failure. Also in the body I see I can only send pactbroker.verificationResultUrl but not the results themselves like I see here: Compatibility Checks (breaking change detection) | PactFlow Documentation
m
I have not fully gone through the Webhook docs yet but I don’t see any event type for a cross contract verification failure. Also in the body I see I can only send pactbroker.verificationResultUrl but not the results themselves like I see here:
Yeah, there aren’t webhooks for this but we could look to create them. That plan seems reasonable though