GitHub Integration

Create a GitHub App

To configure the GitHub integration you'll need to create a GitHub app and obtain credentials. If you're developing within getsentry a set of development credentials are already configured.

Start by following GitHub's official guide on creating a GitHub App.

When configuring the app, use the following values:

SettingValue
Homepage URL${YOUR_DOMAIN}
User authorization callback URL${YOUR_DOMAIN}/auth/sso/
Setup URL (optional)${YOUR_DOMAIN}/extensions/github/setup/
Webhook URL${YOUR_DOMAIN}/extensions/github/webhook/

When prompted for permissions, choose the following:

PermissionSetting
Repository administrationRead-only
Repository contentsRead-only
IssuesRead & write
Pull requestsRead & write
Repository webhooksRead & write

You'll be given various credentials, configure them in config.yml:

Copied
# App ID
github-app.id: GITHUB_APP_ID
# App Name
github-app.name: "GITHUB_APP_NAME"
# Client ID
github-app.client-id: "GITHUB_CLIENT_ID"
# Client Secret
github-app.client-secret: "GITHUB_CLIENT_SECRET"

Sentry utilizes webhooks for Push and Pull Request events. Generate a webhook secret and add it to your configuration:

Copied
$ ruby -rsecurerandom -e 'puts SecureRandom.hex(20)'

Last, generate and download the private key, and add it to your configuration for your app:

Copied
github-app.private-key: |
  -----BEGIN RSA PRIVATE KEY-----
  privatekeyprivatekeyprivatekeyprivatekey
  privatekeyprivatekeyprivatekeyprivatekey
  privatekeyprivatekeyprivatekeyprivatekey
  privatekeyprivatekeyprivatekeyprivatekey
  privatekeyprivatekeyprivatekeyprivatekey
  -----END RSA PRIVATE KEY-----
You can edit this page on GitHub.