Situation
We use different approaches of versioning for our feature and main branches. Extracting the commit from the feature version is not possible, however as far as I can tell this also isn't necessary for using the contract_requiring_verification_published, as the hook would normally just re-run validation for the main branch HEAD, as well as any version deployed to an environment (which in our case can also only be from main).
Problem
When I test the webhook using the execute endpoint, the Pipeline will still be started with a version from a feature branch, despite contracts existing on the main branch. As the pipeline is unable to restore the target commit from the main branch the pipeline fails expectedly, without being able to test the validation pipeline to the end.
Suggested Solution
Using the execute endpoint for contract_requiring_verification_published should try to use a provider version from the provider's main branch.