GitHub Notification

GitHub webhook notifications allow you to communicate various organization or repository-level events to external systems. When one of these events occurs, GitHub sends an HTTP POST payload to the webhook's configured URL, after which the external system is able to process the event on your behalf.

The opensentinel GitHub Notification handler alerts you of these events through the following integrations (as automation destinations):

GitHub Repository Setup

This section will walk you through configuring your GitHub repository with your opensentinel webhook URL.

  1. On your GitHub repository page, click on Settings link at the top and then the Webhooks link on the left.

    GitHub webhook setup - step 1

  2. Click the Add webhook button at the top.

    GitHub webhook setup - step 2

  3. Fill in the webhook URL form and click the green Add webhook button at the bottom.

    • Enter in the full webhook URL into the Payload URL field

    • Click the Let me select individual events checkbox and narrow down your events.

      We recommend the following choices:
      - `Issues`
      - `Pull requests`
      - `Pushes`
      - `Releases`
      - `Stars`

    GitHub webhook setup - step 3

    Note that opensentinel accepts both application/x-www-form-urlencoded and application/json so either choice is valid for the Content type setting.

  4. opensentinel will then send you a confirmation message to validate that this worked correctly.

    GitHub webhook setup - step 4

    This is an example of the message you receive in Keybase.

Supported Events

opensentinel is capable of processing the following GitHub webhook events, everything else is silently ignored.

| Event | Notes | | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ping | | | star | | | issues | | | push | Only pushes to the configured default branch will register (e.g. main) | | pull_request | You will be notified when pull-requests are opened, updated, closed, reopened, and merged. | | release | Publishes the full release info as a message to your team channel or DM. Triggered when a release is initially published and ignores drafts or pre-releases. Have a look at our #general channel to see an example of this. |