Skip to content

githubWebhooks

Noelia Ruiz Martínez edited this page Oct 28, 2018 · 4 revisions

Using GitHub webhooks to receive notifications

Purpose

This can be helpful to receive notifications, for example on a mailing list, when Gitub repos trigger push events, i.e., when new code or tags are pushed in the add-ons development process.

Procedure

Create a Google web app

  1. Copy this script sample in an accessible editor, such as Notepadd++ or Notepad:

  2. Replace [email protected] with the email address you want to use, for instance, using the groups.io email integration.

  3. Create a project at https://script.google.com

    • In the multi-line edit box, copy your modified script and press control+s to save.
    • Select Publish > Deploy as web app.
    • Under Execute the app as, select run with your account.
    • Under Who has access to the app, select Anyone, even anonymous.
    • Click Deploy.
    • Copy the Current web app URL.

    For more details, please see Web Apps  |  Apps Script  |  Google Developers.

Configure a webhook on GitHub

  1. From a GitHub repo, go to Settings > Webhooks > Add webhook.
  2. In the Payload URL edit box, copy the URL for your web app.
  3. In the Content type combo box, select application/json.
  4. In the Enable SSL verification set of radio buttons, disable this option.
  5. Press Add webhook.

Note: In the above process, you may need to confirm your GitHub password.

References

Clone this wiki locally