Hey all, any ideas on how to get github API status...
# pactflow
j
Hey all, any ideas on how to get github API status check webhooks to work with a monorepo? Our issue is we want to conditionally fail a PR when pact verification fails, but only for the service that is being changed. We have well over a dozen different services, so we can't put a blanket "you can't merge this PR until the pact status comes back successful" block. Thoughts?
actually the monorepo isn't the issue, I'm just overcomplicating how webhooks work in my head. I just need to implement
can-i-deploy
tagging environments and checking in the PR and that should work. My only question now is how does
can-i-deploy
work in CI when it needs to wait for the separate pact verification job to run, which takes 5 to 8 minutes?
since the original consumer CI job has no knowledge of the separate provider verification CI job
u
there’s a flag in can-i-deploy to keep polling + retries for however long while waiting for results IIRC
thankyou 1
j
Thank you that's very helpful
✅ 1
or would I use can-i-merge here since it's for a PR? I don't see any docs for the can i merge api here https://github.com/pact-foundation/pact-ruby-standalone/releases/tag/v2.0.4
u
can-i-merge? never seen that one. Only familiar with can-i-deploy, which for our purposes is what we want since 1 merge = 1 rollout
u
still don’t see how that is different from can-i-deploy thinking2
j
doesn't use environments since I want to check verification results before merging instead of deploying to an environment
u
right, so it’s equivalent to 1 run of can-i-deploy / environment? almost as if you could do something like
--environment *
?
we just have N pipelines, each checking each environment (we have a handful) and we’re done with it
s/pipelines/jobs/
j
I would be able to say more after playing with
can-i-merge
, but I can't read the entire help doc in the cli and it's not on the link I sent either. How do you expand this message?
u
something like
pact-broker CMD --help
?
m
Sorry I missed this thread, I'll chime in tomorrow with more.
But for help it's
pact-broker help CMD
thankyou 1