Skip to main content

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:

PermissionPurposeSecurity considerations
Pull requests: read-onlyProvides access to PR content and metadataKapa 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

  1. Go to the Sources tab on the Kapa platform and click on Add new source
  2. Enter a name for the source, select GitHub Pull Requests, and click Continue
  3. Specify the GitHub repository to use by filling in the Owner and Name fields
  4. If it's a private repository, enter a personal access token for authentication
  5. 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:

  1. Set Pull Request State to define whether to include open PRs, closed PRs, or both
  2. Choose whether to exclude PRs that were closed but not merged
  3. Set Pull Request Age to limit how far back to pull PRs
  4. Select Pull Request Labels to filter for specific types of PRs
  5. Click Save to begin the ingestion process

Configuration options

The following configuration options are available for the GitHub Pull Requests integration:

OptionDescriptionDefaultRequired
OwnerGitHub username or organization that owns the repositoryNoneYes
NameName of the GitHub repositoryNoneYes
Personal access tokenToken for authenticating to GitHub (for private repositories)NoneFor private repos
Pull Request StateFilter by PR state (open, closed, or both)BothNo
Exclude closed unmerged PRsWhen enabled, excludes PRs that were closed without being mergedDisabledNo
Pull Request AgeOnly include PRs created within this time periodAll timeNo
Pull Request LabelsOnly include PRs with these labelsAll labelsNo

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 and area/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