Other GitHub sources read the same repository: GitHub Issues, GitHub Pull Requests, GitHub Files and GitHub Code. Add any of them side by side.
Before you start
- A Pro plan or higher, and permission to edit sources in the knowledge base.
- A repository with Discussions turned on.
- A GitHub access token. It is required even for a public repository: GitHub only serves discussions to signed-in requests.
Token permissions
Use a fine-grained personal access token limited to the repositories you connect, with:- Discussions: read-only
- Metadata: read-only (GitHub adds this automatically)
repo scope also works. Kelu only reads; it never writes to your repository.
Set up
Choose GitHub Discussions
Open your knowledge base, go to Sources, click Add source and choose GitHub Discussions. Give the source a name.
Name the repository
Fill in Owner and Repository name. Pasting the repository URL into Owner fills both. Paste the Access token.
Choose what to index (optional)
Set State, Categories, Labels, Exclude labels and Updated within, and choose whether to keep only answered discussions.
Options
| Option | Default | What it does |
|---|---|---|
| Owner | — | Required. The user or organization that owns the repository. |
| Repository name | — | Required. |
| Access token | — | Required. |
| API URL | Empty | GitHub Enterprise Server only, for example https://github.example.com/api/v3. |
| State | All | All, Open only or Closed only. On discussions, closed can mean resolved or abandoned. |
| Categories | Empty | One per line, spelled as GitHub shows them, for example Q&A. Empty indexes every category. |
| Labels | Empty | Keeps discussions that carry at least one of these labels. |
| Exclude labels | Empty | Drops discussions that carry any of these labels. Wins over Labels. |
| Updated within | Empty | Only discussions updated in the last N days. Empty indexes all of them. |
| Only discussions with an accepted answer | Off | Drops every discussion without a marked answer, including ones answered in a comment nobody marked. |
What gets indexed
- One document per discussion, titled
Discussion #123: title. - It holds the category, who asked, the labels and the date, then the question, the accepted answer, and the replies.
- Up to 50 comments are read per discussion, each with up to 20 replies. The source’s Sync history tab lists any discussion that was cut.
Sync
GitHub Discussions re-syncs every hour. Discussions that did not change are skipped. Click Sync Now on the source page to sync right away.Troubleshooting
- An error says discussions need a token. Add one, even for a public repository.
Discussions are not enabled on owner/name. Turn Discussions on in the repository’s settings.discussion category "…" does not exist. The error lists the categories the repository has. Fix the name in Categories.- The sync fails with
rate limit exhausted. Wait for the reset time in the error. If it keeps happening, narrow Categories or Updated within. - A label filter matched nothing. Check the label is applied to the discussions themselves.
repository … not found, or this token cannot see it. Check the owner and name, and that a fine-grained token lists this repository.