To set up the Github tool you will need a Github application. Follow the steps below to set it up:
Head to the Github Settings and create a new app.
Specify App permissions, Callback URL (for local setup - http://localhost:8000/v1/tool/auth).
Uncheck the Webhook->Active
option. After creating the app, you will see the General
section. Copy the Client ID
, generate and copy Client Secret
values.
That will be used for the environment variables specified below.
This tool also support OAuth Apps. See the documentation for more information.
Set the configuration in the configuration.yaml
github:
default_repos:
- repo1
- repo2
user_scopes:
- public_repo
- read:org
Then set the following secrets variables. You can either set the below values in your secrets.yaml
file:
github:
client_id: <your_client_id from step 1>
client_secret: <your_client_secret from step 1>
or update your .env
configuration to contain:
GITHUB_CLIENT_ID=<your_client_id from step 1>
GITHUB_CLIENT_SECRET=<your_client_secret from step 1>
GITHUB_DEFAULT_REPOS=["repo1","repo2"]
GITHUB_USER_SCOPES=["public_repo","read:org"]
Please note if the default repos are not set, the tool will process over all user repos.
run next command to start the backend and frontend:
make dev
If you encounter any issues with OAuth, please check the following link