You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To set up the Github tool you will need a Github application. Follow the steps below to set it up:
4
+
5
+
## 1. Create a Github App
6
+
7
+
Head to the [Github Settings](https://github.com/settings/apps) and create a new app.
8
+
Specify App [permissions](https://docs.github.com/rest/overview/permissions-required-for-github-apps), Callback URL (for local setup - http://localhost:8000/v1/tool/auth).
9
+
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.
10
+
That will be used for the environment variables specified below.
11
+
This tool also support OAuth Apps. See the [documentation](https://docs.github.com/en/apps/oauth-apps) for more information.
12
+
13
+
## 2. Set Up Environment Variables
14
+
Set the configuration in the `configuration.yaml`
15
+
```yaml
16
+
github:
17
+
default_repos:
18
+
- repo1
19
+
- repo2
20
+
user_scopes:
21
+
- public_repo
22
+
- read:org
23
+
```
24
+
25
+
Then set the following secrets variables. You can either set the below values in your `secrets.yaml` file:
26
+
```yaml
27
+
github:
28
+
client_id: <your_client_id from step 1>
29
+
client_secret: <your_client_secret from step 1>
30
+
```
31
+
or update your `.env` configuration to contain:
32
+
```dotenv
33
+
GITHUB_CLIENT_ID=<your_client_id from step 1>
34
+
GITHUB_CLIENT_SECRET=<your_client_secret from step 1>
35
+
GITHUB_DEFAULT_REPOS=["repo1","repo2"]
36
+
GITHUB_USER_SCOPES=["public_repo","read:org"]
37
+
```
38
+
Please note if the default repos are not set, the tool will process over all user repos.
39
+
40
+
## 3. Run the Backend and Frontend
41
+
42
+
run next command to start the backend and frontend:
43
+
44
+
```bash
45
+
make dev
46
+
```
47
+
48
+
## 4. Troubleshooting
49
+
50
+
If you encounter any issues with OAuth, please check the following [link](https://api.Github.com/authentication/oauth-v2#errors)
assertresult==ToolError(type=ToolErrorCode.OTHER, success=False, text='No results found.', details='No results found for the given params.')
75
+
assertresult==[ToolError(type=ToolErrorCode.OTHER, success=False, text='No results found.', details='No results found for the given params.').model_dump()]
assertresult==ToolError(type=ToolErrorCode.OTHER, success=False, text='No results found.', details='No results found for the given params.')
159
+
assertresult==[ToolError(type=ToolErrorCode.OTHER, success=False, text='No results found.', details='No results found for the given params.').model_dump()]
0 commit comments