Johannes Marx
09/02/2022, 7:21 AMWebhooks with GitHub on the event "Contract published that requires verification" to trigger the GitHub action on the provider side.
My question is about the authorization. I was trying to use a GitHub App as a "system account" but I doesn't work be cause a multi-step auth is required (e.g. create installation access token that is valid for 1 hour).
Am I right that I basically need to create a "system user" in GitHub, create a PAT for that system user and simply use this to authenticate the webhook? Or am I missing something? I basically don't want to use a PAT of a "real" personal account within the organization.
Thanks in advance for your support 👍Beth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
Beth (pactflow.io/Pact Broker/pact-ruby)
Johannes Marx
09/14/2022, 7:01 AM$ curl -i -X POST \
-H "Authorization: Bearer YOUR_JWT" \
-H "Accept: application/vnd.github+json" \
<https://api.github.com/app/installations/:installation_id/access_tokens>
This Bearer Token is valid for 60 minutes
3.
Call the webhook/GitHub API with the Bearer Token from step 2.
Thanks
JohannesBeth (pactflow.io/Pact Broker/pact-ruby)
Johannes Marx
09/14/2022, 9:13 AMJohannes Marx
09/14/2022, 9:39 AMMatt (pactflow.io / pact-js / pact-go)