Notes on Creating a GitHub Webhook

To create a webhook, on github click on settings, webhooks, add webhook. Fill in the following:

  • payload url
  • choose a web type
    • halld_recon and halld_sim use application/json
  • enter a secret
    • halld_recon and halld_sim leave the secret blank
  • choose which events trigger the webhook. push is the most common
    • halld_recon selects pull requests under “let me select individual events”
  • set the Active check box when it is ready to go

From Marty:

To create a new instance of the same thing, you should:

  • Create a directory for it — /group/halld/www/halldweb/<newname> into which you place your code.
    • made the directory newname = build_scripts_webhook
    • (directory in marty’s message should be /group/halld/www/halldweb/htbin/<newname>)
  • Create a new password file like /group/halld/www/config/<newname>pw
    • called it build_scripts_webhook_pw
  • Add a user and password as desired
    • username = bstester , password=********
  • Let me know what <newname> is so I can add the necessary config

Here the message sent to Marty:

Marty,
I created the new script for execution from github. The script is
/group/halld/www/halldweb/htbin/build_scripts_webhook/build_scripts_test.py
The password file is
/group/halld/www/halldweb/config/build_scripts_webhook_pw
Let me know if I have to do anything else.
— Mark