GitHub¶
By enabling this toolset, HolmesGPT will be able to interact with GitHub repositories, read files, create pull requests, and manage branches. This is useful for accessing runbooks, documentation, or configuration files stored in GitHub.
Prerequisites¶
- A GitHub Personal Access Token with appropriate permissions:
repo
scope for private repositoriespublic_repo
scope for public repositoriespull_requests:write
for creating PRs
You can create a token at GitHub Settings > Developer settings > Personal access tokens.
Configuration¶
First, set the following environment variable:
Then add the following to ~/.holmes/config.yaml, creating the file if it doesn't exist:
To test, run:
Advanced Configuration¶
You can configure additional options:
toolsets:
git/github:
enabled: true
config:
default_branch: "main" # Default branch to use
max_file_size: 1048576 # Maximum file size to read (1MB)
timeout: 30 # Request timeout in seconds
Capabilities¶
Tool Name | Description |
---|---|
github_read_file | Read a file from a GitHub repository |
github_list_files | List files in a GitHub repository directory |
github_search_files | Search for files in a repository by name or content |
github_create_pr | Create a new pull request |
github_update_pr | Update an existing pull request |
github_list_branches | List branches in a repository |
github_create_branch | Create a new branch |
github_get_commit | Get details about a specific commit |