Question for <dynamic variables> in pactflow webho...
# pactflow
j
Question for dynamic variables in pactflow webhooks: The pactflow docs link to the Github API for getting the status variable, I was looking at the example response in those docs and was wondering if we could also get the github actions CI run URL? So in addition to
${pactbroker.githubVerificationStatus}
, it'd be great to have something like
${pactbroker.githubActionsRunURL}
. In that example response, I believe it's one of the url values, something like
statuses[0].target_url
or
statuses[0].url
, or it could be just
url
or
statuses_url
. It would be nice to send this url with the slack notification webhook from Pactflow so the user can click directly to the actual run in CI since it's going to have additional relevant information to just the Pactflow verification URL.
If I were to send the slack notification from github actions itself, this is trivial to construct the url via environment variables like so:
Copy code
{{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
but making a new github actions job just for this webhook isn't great, especially if we want it to trigger off of things like contract content changed, which CI is going to have no idea about but the broker will.
m
I'll add it as a feature request. It might be easily added to the existing OSS broker if you're interested. For PactFlow we'll review in the next set of webhooks updates
thankyou 1