A question on webhooks variable substitution: <htt...
# pact-broker
s
A question on webhooks variable substitution: https://github.com/pact-foundation/pact_broker/blob/master/lib/pact_broker/doc/views/webhooks.markdown#dynamic-variable-substitution
${pactbroker.providerVersionDescriptions}
is a string, but it seems on the broker side it's actually a list? Like in my webhook logs I can see that originally it's a list:
"provider_version_descriptions":["latest from main branch"]
but then when my webhook is called it's converted to a string:
"provider_version_descriptions":"latest from main branch"
. My webhook was created with
"provider_version_descriptions": "${pactbroker.providerVersionDescriptions}"
as parameter. So the questions are: • can there be more than one version description? I'd guess if the same version is deployed in prod and is also the latest master, it would be a list? • is it possible to pass it as a list to the webhook endpoint, like can I just specify smth like
"provider_version_descriptions": ["${pactbroker.providerVersionDescriptions}"]
as a parameter?
m
that’s an interesting question, I don’t know actually. I know that multiple webhooks will fire, once per version that needs to be verified
But these are de-duplicated, so one webhook firing may have multiple reasons (descriptions) for firing
s
yeah, I was aware of deduplication logic, just wasn't sure how the reasons will be presented. And testing it is a little heavy, since it needs publishing couple of versions and some verification results. Thanks! 🙂
💯 1