Adding GitHub issues to your chat experience enables you to get a high-level understanding of the work that needs to be done. An indirect benefit is that, when asking code-related questions, the LLM has more context on bugs and features that don’t exist yet (and is less likely to hallucinate them).

Requirements

Set up a vector store

In order to chat with GitHub issues, you will need to use advanced retrieval, which requires a vector store to be set up.

Private GitHub token

In order to call GitHub’s API, we need a personal access token. Once you’ve created the token, export it to an environment variable:

export GITHUB_TOKEN=...

Index issues

To index GitHub issues without comments:

sage-index $GITHUB_REPO --index-issues

To index GitHub issues with comments:

sage-index $GITHUB_REPO --index-issues --index-issue-comments

To index GitHub issues, but not the codebase:

sage-index $GITUB_REPO --index-issues --no-index-repo