# GitHub

### How to Send GitHub Commit Data to Hosted Graphite

To get GitHub commits flagged in Hosted Graphite follow these instructions:

* **Go to the Addons page, and in the Annotation Add-Ons section click on the GitHub card.**
* **Copy the webhook URL, including your API key.**

<figure><img src="https://495119770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZtHmoGZNsmARIViZEdbz%2Fuploads%2F1Ww3YlxIGOKVnKrp0zSR%2Fimage.png?alt=media&#x26;token=200b07f7-f34f-44a5-8ab8-cdc37eb0e159" alt=""><figcaption><p>Copy the webhook URL from the GitHub add-on page</p></figcaption></figure>

* **Browse to your GitHub repo, visit the ‘settings’ section, then ‘webhooks’**
* **Under ‘Webhooks’ click the “Add Webhook” button.**
* **Enter the URL in the box provided**
* **Select ‘application/json’ as the content type, and ‘send me everything’**

<figure><img src="https://495119770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZtHmoGZNsmARIViZEdbz%2Fuploads%2FN9uAGJeGBuYtirmMHywg%2Fimage.png?alt=media&#x26;token=8c19196e-fa85-49e0-aa40-ee2a87c31b6c" alt=""><figcaption><p>Enter your webhook URL into the Github New Webhooks page</p></figcaption></figure>

* Hit `Save`

Your GitHub events will now be sent to the webhook URL and saved on your account as [Annotations](https://docs.hostedgraphite.com/api-guides/annotations-and-events-api). Use the following tags to search for the annotations you want to display:

* **Push Event Tags** – ‘github’, ‘push’, \<repo>, \<branch>, \<user>
* **PR Event Tags** – ‘github’, ‘pull-request’, \<action>, \<repo>, \<user>
* **Deploy Event Tags** – ‘github’, ‘deployment’, \<status>, \<repo>, \<user>, \<environment>

<figure><img src="https://495119770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZtHmoGZNsmARIViZEdbz%2Fuploads%2FLrb5Rch4ahKbsNJtqlhI%2Fgithub-annotations-v9.png?alt=media&#x26;token=7a60f267-dfda-43cc-ab9c-e97519248d9b" alt=""><figcaption><p>GH Annotations</p></figcaption></figure>
