Skip to content
share

GitHub Webhook Events Integration

By configuring the Webhook to point to Sematext, you can store all data about the triggered events in one place. Gain insight into the entire GitHub workflow in your Organization.

GitHub Webhook Events Quick Start

When an event is triggered, GitHub sends an HTTP POST payload to the Webhook's configured URL. Webhooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server. You're only limited by your imagination.

Gain insights into your Organization's team pulse, patterns, metrics, development velocity, progress, trends, to spot opportunities for improvement in the daily workflow. Keep your team happy and enable them to be more productive and fulfilled.

The Sematext GitHub Webhook Events Integration supports these events:

  • Commit comments
  • Branch or tag creation
  • Branch or tag deletion
  • Issues
  • Issue comments
  • Pull requests
  • Pull request reviews
  • Pull request review comments
  • Pushes
  • Releases

You can configure a Webhook to send events to Sematext either through the Github UI or with their API.

Set Up A GitHub Webhook In The GitHub UI

Open the Organization or Repository settings, navigate to Webhooks and click the Add webhook button.

Add the Payload URL.

https://logs-github-receiver.sematext.com/github/<LOGS_TOKEN>

# Or for EU
https://logs-github-receiver.eu.sematext.com/github/<LOGS_TOKEN>

Check the supported Events and Save the Webhook.

Save the Webhook.

Set Up A GitHub Webhook Using The GitHub API

First create a new API token. Open the Personal Access tokens settings in your GitHub account. It should be here. Click Generate new token. The only permissions you need are related to hooks.

Finish creating the token and save it somewhere safe. You will need it in the next step.

Now you need to create a webhook. Using cURL you can now create a new Webhook in any Organization or Repository you have access to.

Organization

curl -X POST \
  https://api.github.com/orgs/<ORGANIZATION_NAME>/hooks \
  -H 'authorization: token <YOUR_API_TOKEN>' \
  -H 'cache-control: no-cache' \
  -d '{ 
  "config": { 
    "url": "https://logs-github-receiver.sematext.com/github/<LOGS_TOKEN>" 
    # for EU "url": "https://logs-github-receiver.eu.sematext.com/github/<LOGS_TOKEN>" 
  }, 
  "events": [ 
    "issues", 
    "issue_comment", 
    "pull_request", 
    "pull_request_review", 
    "pull_request_review_comment", 
    "commit_comment", 
    "push", 
    "release", 
    "create", 
    "delete" 
  ] 
}'

Repository

curl -X POST \
  https://api.github.com/repos/<GITHUB_USERNAME>/<REPOSITORY_NAME>/hooks \
  -H 'authorization: token <YOUR_API_TOKEN>' \
  -H 'cache-control: no-cache' \
  -d '{ 
  "config": { 
    "url": "https://logs-github-receiver.sematext.com/github/<LOGS_TOKEN>" 
    # for EU "url": "https://logs-github-receiver.eu.sematext.com/github/<LOGS_TOKEN>" 
  }, 
  "events": [ 
    "issues", 
    "issue_comment", 
    "pull_request", 
    "pull_request_review", 
    "pull_request_review_comment", 
    "commit_comment", 
    "push", 
    "release", 
    "create", 
    "delete" 
  ] 
}'

Exploring logs

The Github integration comes with several pre-built dashboards that, you will find, provide valuable insight about your team's development speed. Below is an example of one such dashboards, but as you can see on the left side of this screenshot, there are other reports reports that this integration provides out of the box.

Github Team Pulse Dashboard