Cerb + GitHub
- Introduction
- Create an OAuth application at GitHub
- Create the GitHub service in Cerb
- Link the connected account to GitHub in Cerb
- Use the connected account in bot behaviors
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.
-
Visit the GitHub OAuth applications settings page.
-
Click the green Register a new application button.
- 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
-
Click the Register application button.
- Make a note of your Client ID and Client Secret for the next step.
Create the GitHub service in Cerb
-
Navigate to Search » Connected Services.
-
Click the (+) icon in the top right of the list.
-
Select GitHub.
-
Enter your Client ID and Client Secret.
-
Click the Create button.
Link the connected account to GitHub in Cerb
-
Navigate to Search » Connected Accounts.
-
Click the (+) icon in the top right of the list.
-
Select GitHub.
-
Click the blue Link to GitHub button.
-
Accept consent on GitHub.
-
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.