GitHub Pull Requests
Using GitHub Pull Requests (PRs) as a source allows Kapa to pull PRs from your GitHub repository. This allows Kapa to source information about ongoing development activities and the evolution of features. Additionally, giving Kapa access to PRs ensures optimal support for relevant bugs other users might have experienced.
Prerequisites
- A GitHub repository with pull requests
- Repository owner and name information
- For private repositories, a personal access token with appropriate permissions
Data ingested
When you connect Kapa to GitHub Pull Requests, the following data is ingested:
- Pull request URLs
- PR titles and body content
- Comments and discussion threads on PRs
Permissions required
The following permissions are required when using a personal access token for private repositories:
Permission | Purpose | Security considerations |
---|---|---|
Pull requests: read-only | Provides access to PR content and metadata | Kapa cannot create or modify pull requests |
We recommend using a fine-grained access token limited to only the repositories you want to connect to Kapa.
Setup
Step 1: Connect your repository
- Go to the Sources tab on the Kapa platform and click on Add new source
- Enter a name for the source, select GitHub Pull Requests, and click Continue
- Specify the GitHub repository to use by filling in the Owner and Name fields
- If it's a private repository, enter a personal access token for authentication
- Upon successful connection, a purple text box appears, providing you with the repository description
Step 2: Configure your GitHub PRs
Once you've set up your repository, configure which PRs to include:
- Set Pull Request State to define whether to include open PRs, closed PRs, or both
- Choose whether to exclude PRs that were closed but not merged
- Set Pull Request Age to limit how far back to pull PRs
- Select Pull Request Labels to filter for specific types of PRs
- Click Save to begin the ingestion process
Configuration options
The following configuration options are available for the GitHub Pull Requests integration:
Option | Description | Default | Required |
---|---|---|---|
Owner | GitHub username or organization that owns the repository | None | Yes |
Name | Name of the GitHub repository | None | Yes |
Personal access token | Token for authenticating to GitHub (for private repositories) | None | For private repos |
Pull Request State | Filter by PR state (open, closed, or both) | Both | No |
Exclude closed unmerged PRs | When enabled, excludes PRs that were closed without being merged | Disabled | No |
Pull Request Age | Only include PRs created within this time period | All time | No |
Pull Request Labels | Only include PRs with these labels | All labels | No |
Best practices
- Don't overdo PRs: When adding all historical PRs (open and closed), it may add more noise than signal to Kapa
- Consider adding multiple smaller PR groups: The best strategy for adding PRs depends on how the project manages its PRs; labels like
type/bug
andarea/performance
are usually quite high signal for Kapa to be aware of - Limit to more recent PRs: The PRs that are most valuable are usually those than have been open/closed in the last 6-12 months
- Focus on merged PRs: For historical context, merged PRs typically provide more value than unmerged ones
- Target specific labels: Consider creating separate sources for different PR types (bugs, features, etc.)
Troubleshooting
- Authentication failures: Verify your personal access token has the required permissions and hasn't expired
- No PRs appearing: Check that your repository contains PRs matching your filter criteria