Resources »

Guides »

Integrations »

GitHub »

Cerb + GitHub

Introduction

In this guide we’ll walk through the process of linking Cerb to GitHub. You’ll be able to use GitHub’s full API from bots in Cerb to automate whatever you need.

Create an OAuth application at GitHub

Next, you need to create a new oauth app on GitHub for Cerb to connect to. Review the GitHub OAuth documentation additionally if needed.

  1. Visit the GitHub OAuth applications settings page.

  2. Click the green Register a new application button.

  3. Enter the following details replacing YOUR-CERB-HOST with the URL to your Cerb installation:
    • App Name: Cerb
    • Homepage URL: https://YOUR-WEBSITE
    • Application description: {leave blank}
    • Authorization callback URL: https://YOUR-CERB-HOST/oauth/callback
  4. Click the Register application button.

  5. Make a note of your Client ID and Client Secret for the next step.

Create the GitHub service in Cerb

  1. Navigate to Search » Connected Services.

  2. Click the (+) icon in the top right of the list.

  3. Select GitHub.

  4. Enter your Client ID and Client Secret.

  5. Click the Create button.

Link the connected account to GitHub in Cerb

  1. Navigate to Search » Connected Accounts.

  2. Click the (+) icon in the top right of the list.

  3. Select GitHub.

  4. Click the blue Link to GitHub button.

  5. Accept consent on GitHub.

  6. Click the Save Changes button.

Use the connected account in bot behaviors

You can use the connected account you just created to access GitHub’s API from bot behaviors in Cerb. This is typically accomplished using the Execute HTTP Request action from a bot, and selecting the connected account in the Authentication: section.

You can import the GitHub Bot package for a working example.