Other GitHub sources read the same repository: GitHub Issues, GitHub Discussions, 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.
- The repository’s owner and name.
- For a private repository: a GitHub access token. A public repository needs none, but this source makes several requests per pull request, so a token avoids GitHub’s low limit on anonymous requests.
Token permissions
Use a fine-grained personal access token limited to the repositories you connect, with:- Pull requests: read-only
- Issues: read-only (pull requests are listed through GitHub’s issues endpoint)
- Metadata: read-only (GitHub adds this automatically)
repo scope also works. Kelu only reads; it never writes to your repository.
Set up
Choose GitHub Pull Requests
Open your knowledge base, go to Sources, click Add source and choose GitHub Pull Requests. Give the source a name.
Name the repository
Fill in Owner and Repository name. Pasting the repository URL into Owner fills both. Add the Access token if you have one.
Choose what to index (optional)
Set State, Labels, Exclude labels and Updated within, and choose whether to skip pull requests that were never merged.
Options
| Option | Default | What it does |
|---|---|---|
| Owner | — | Required. The user or organization that owns the repository. |
| Repository name | — | Required. |
| Access token | Empty | Required for a private repository. |
| API URL | Empty | GitHub Enterprise Server only, for example https://github.example.com/api/v3. |
| State | Closed only | Closed only, Open only or All. |
| Labels | Empty | Keeps pull requests that carry at least one of these labels. |
| Exclude labels | Empty | Drops pull requests that carry any of these labels. Wins over Labels. |
| Updated within | Empty | Only pull requests updated in the last N days. Empty indexes all of them. |
| Skip pull requests that were never merged | Off | Drops pull requests that were closed without merging. |
What gets indexed
- One document per pull request, titled
Pull request #123: title. - It holds the status and close reason, who opened it, its labels, the description and the comments (the newest 200).
- Reviews come too: each review’s verdict and text, and each inline review comment with its file, line and up to 20 lines of the diff it was left on.
- Up to 100 reviews and 100 inline comments are read per pull request. The source’s Sync history tab lists any pull request that was cut.
- The full diff is not indexed. For the code itself, add a GitHub Code source.
Sync
GitHub Pull Requests re-syncs every 5 minutes. Pull requests that did not change are skipped. Click Sync Now on the source page to sync right away.Troubleshooting
- Nothing was indexed. Check State. With Closed only, open pull requests are not read.
- Answers cite work that never shipped. Turn on Skip pull requests that were never merged.
- The sync fails with
rate limit exhausted. Add a token, or wait for the reset time in the error. 401or403. GitHub rejected the token, or it cannot read this repository. Check the token permissions above.404. The repository was not found, or the token cannot see it. A fine-grained token must list this repository.- Too many low-value pull requests. Narrow with Labels or Updated within, or put the source in its own source group so only some surfaces answer from it.