Setting up a Github webhook - BIBSYSDEV/pipeline-builder GitHub Wiki
Requirements
- You have deployed the code.
Finding out the static URL for the Github webhook.
Alternative 1.
One alternative is to navigate to the Swaggerhub account and the API that you specified during the deployment phase.
The URL that you need is the server address shown by the API plus the /github path. Example https://example.com/github
Alterantive 2.
Second alternative is to navigate to the published Api Stage and export the Swagger documentation. In the documentation, you can find the server address.
Creating a GithubWebhook
- Copy the URL for the Github webhook as described above.
- Don't forget to add the
/githubendpoint in the end of the URL.
- Don't forget to add the
- Navigate to the Github repository that you want to deploy
- Go to
Settings-->Webhooks - Click to add a webhook.
- As
Payload URL, add the URL for the Github webhook you stored in Step 1. - As
Content typeselectapplication\json - As
Secretadd the secret value for the keygithub_webhook_authorizationdescribed in API keys - Select the "Let me select individual events" option.
- From the event list select the
PullRequestand unselectPushes