First, create the stream you'd like to use for GitHub Webhook notifications,
and subscribe all interested parties to this stream. The integration will
use the default stream github
if no stream is supplied in
the hook; you still need to create the stream even if you are using this
default.
Next, go to your repository page and click "Settings":
From there, select "Webhooks":
Click "Add webhook".
Authorize yourself and configure your webhook.
In the "Payload URL" field, enter a URL constructed like this:
{{ external_api_uri_subdomain }}/v1/external/github?api_key=abcdefgh&stream=github
where api_key
is the API key of your Zulip
bot.
You can also limit the branches you receive notifications for by specifying them in a comma-separated list at the end of the URL, like so:
{{ external_api_uri_subdomain }}/v1/external/github?api_key=abcdefgh&stream=github&branches=master,development
Then, set "Content type" to application/json
.
Next, select the actions that you want to result in a Zulip notification and click Add Webhook.
Congratulations! You're done!
Your messages will look like this: