GitHub Integration Guide logoGitHub Integration Guide

Last updated Aug 28th, 2024

Overview

By integrating GitHub with Common Room you can see contributors, comments, pull requests, repo stars, repo forks, issues, discussions, and top programming languages for members of your community. Common Room creates a profile for every contributor in your GitHub community and an activity for each issue, pull request, comment, or starred repo.

Setup

Before integrating GitHub, login to the GitHub account you want to integrate into Common Room. Once you're logged in, open the signals page in Common Room, and select GitHub.

  1. Select GitHub from the list of signals.
  2. Connect GitHub. When you connect GitHub, Common Room will surface activity and insights across pull requests, issues, contributors, starred repos, and comments.
  3. Authenticate your GitHub and select repos. Select "I have admin access or approval". The GitHub integration with Common Room requires admin access or approval. If you don't have admin access to your GitHub account, an email request will be sent to your admin to approve the integration.
  4. Install and authorize Common Room. When you install and authorize Common Room to access your GitHub repository, you can select between some or all of your public repos.
  5. Begin data import. After authorizing Common Room, your data will start to import. Importing your data may take up to a few hours, and we’ll email you when everything’s ready. In the meantime, you can take a peek into Common Room. The charts and functionality may be a little empty to start but will populate as your data flows in.

Technical details

The GitHub integration with Common Room is available on Essentials, Team, and Enterprise plans, and requires approval from a GitHub organization admin.

Contacts and Activity

Contacts are created from users who have created or commented on an issue, pull request, or discussion, and from users who have starred any repos.

When connecting to GitHub, you can configure which repositories you’d like to import. Within your specified repositories, Common Room will create members and activities for every GitHub user who:

  • Stars a repository
  • Forks a repository
  • Creates or comments on an issue
  • Creates, closes, merges, or comments on a pull request
  • Merges a commit
  • Posts or replies in a Discussion

Import history

Once you configure your GitHub integration, Common Room will import the entire activity history from the repositories you’ve chosen. This may take some time depending on the size and age of the repositories.

Sync frequency

Once the integration is configured, Common Room will automatically import new activity within a few minutes of it occurring on GitHub.

Obtaining a GitHub API Key

There may be occasions where, in order to action a customer request (like connecting an unowned repo in Common Room), our team will request to be sent a GitHub API Key. To send over this key, please follow the instructions below:

  1. Log into your personal GitHub account and go to https://github.com/settings/tokens/new
  2. Create a new personal access token (classic) with the following parameters:
    • Note: "CR Imports"
    • Expiration: No expiration
    • Select scopes: Check the boxes for "read:org," "read:user," and "user:email."
    • Click "generate token" and copy the resulting token (starts with “ghp_“)

FAQ

When I connect to all GitHub repositories, does this include both public and private repos?

Common Room only ingests information from public repos, regardless of the option you choose. Private repo information will never appear in Common Room.

How can I sync additional GitHub repositories to Common Room?

In Common Room, open Settings → Signals → GitHub, select "Add Another Account," choose the account that's already connected and select both the new repos they want and the existing repos that were already connected. Note that

If a Contact unstars a repo, will this appear in their activity?

No. If a Contact stars a repo, this activity will appear in their profile. However, if a Contact un-stars a repo, the activity and history of them starring it will be removed from their profile.

Why is there a difference between connecting an owned vs. unowned repo in the platform?

Owners of GitHub repos can grant access with OAuth, which is much more secure and easy to set up than exchanging API keys. However, if you want to listen to a repo that you don't own, you can't OAuth to it (because the OAuth protocol validates access permissions). In these cases, we use an API key, which allows access to the repo and related info without utilizing any global rate limits, helping us keep your data as fresh as possible using the key provided (as opposed to using a shared key, which would hit rate limits and not let us ingest as fast as we can with a unique key). Note that when pulling in unowned repos via API key, new repos must be explicitly added as they are not not automatically ingested.

Didn't find your answer?Get in touch· Visit ourhelp center