Setting up a Github webhook - BIBSYSDEV/pipeline-builder GitHub Wiki

Requirements

  1. 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

  1. Copy the URL for the Github webhook as described above.
    • Don't forget to add the /github endpoint in the end of the URL.
  2. Navigate to the Github repository that you want to deploy
  3. Go to Settings --> Webhooks
  4. Click to add a webhook.
  5. As Payload URL, add the URL for the Github webhook you stored in Step 1.
  6. As Content type select application\json
  7. As Secret add the secret value for the key github_webhook_authorization described in API keys
  8. Select the "Let me select individual events" option.
  9. From the event list select the PullRequest and unselect Pushes