Table of Contents

How do I enable a real-time connection to LinearB?

Why should I connect real-time alerts? A vast majority of connections made to LinearB are already enabled for real-time communication with your Git repositories. Occasionally LinearB is unable to con…

Betsy Rogers
Updated by Betsy Rogers

Why should I connect real-time alerts?

A vast majority of connections made to LinearB are already enabled for real-time communication with your Git repositories. Occasionally LinearB is unable to connect in real-time to a repository. This can happen when the Git credentials given to LinearB do not have admin rights to all repositories. Without a real-time connection, dashboards can be delayed in updating with Git activity. Crucial alerts in Slack are also affected, causing a delay in notifications such as when CI tests pass/fail, or review requests are submitted/updated/approved. These alerts have been shown to reduce cycle time by increasing a development teams awareness of the entire coding/review pipeline.

How does LinearB access Git data in real-time?

Upon authentication, LinearB will try to connect webhooks to all repositories to which LinearB has access. The use of repository hooks allow LinearB to collect real-time data from your Git provider. They’re established upon connection and enable LinearB to provide immediate updates to your reporting dashboards, as well as alert your teams to pipeline activity and potential bottlenecks via our Slack integration.

Methods for updating to realtime access

In order to access Git data in real-time. We need to link a Git account with LinearB that has admin rights to all relevant repositories. Here are some ways to enable a real-time connection to LinearB:

Create a service account in your Git org

It is advisable to create a service account in order to grant LinearB the appropriate permissions without disrupting any existing security or clearance settings that apply to individual users. A service account would be a generic email (for example: linearb@companyname.com) that has admin permissions to all repos. After creating this new account, contact contact support for assistance in re-authenticating with this new connection. Instructions on this process can be reviewed here.

New service accounts will need to be created by the admin of your Git admin.
GitHub

To create a user with owner access to a GitHub org. The GitHub admin can click on the People tab at the top of their org, click on the Invite member button. Set the "Role in Organization" to Owner, and click "Send invitation"

GitLab

Add a user to a group which covers all relevant projects. Typically a "global admins" group is already created in GitLab instances Learn more about creating groups in GitLab here.

Bitbucket

Add a user with global admin permissions. Instructions on granting global admin permissions can be found here.

Upgrade your git user permissions

The Git account linked to LinearB will need to have Owner access to your Git org, or Admin access to the repos you're working on. Contact your Git admin and ask to be granted either of these permission levels. Below are instructions your admins can follow.

LinearB will check and attempt to connect new webhooks every 2 days. If your admin rights get updated contact us and we'll be happy to manually update your repositories immediately!
GitHub

In order to receive realtime updates in LinearB, the connected GitHub account can either be set as the "owner" of an org, or be given admin access to the repos you would like to monitor in LinearB

Org Access: To give a user owner access to a GitHub org. The GitHub admin can click on the People tab at the top of their org, click on the gear icon next to the user they would like to upgrade, select Change role... and set the user to Owner.

Individual Repo Access: Admin access can be given on an individual repos. If you have a lot of repos, this will get tedious for your GitHub admin, a service account might be easier to manage. Instructions on setting a user as an admin per repo can be found here.

GitLab

In order to receive realtime updates in LinearB, the connected GitLab account will need "Maintainer" or "Owner" permissions. This can be granted on a project by project basis, or to the entire GitLab account via groups

Org Level Access: The user can be added to a group which cover all relevant projects. Learn more about creating groups in GitLab here.

Project Level Access: GitLab admins can log into any GitLab project and click on the Settings tab, select Members. You will see a list of current members and the option to add a member to your project. Click on a dropdown under Choose a role permission section and add the member to the maintainer or owner role. More information on editing users with access to a project can be found here.

Bitbucket

In order to receive realtime updates in LinearB, the connected Bitbucket account will need "Admin" permissions. Bitbucket can apply this permission to users on a global, project, or repo-specific level. It's advisable to link an account to LinearB with global access to avoid any issue gathering real-time data in the future.

Granting global admin permissions

Granting project-level admin permissions

Granting repo-level admin permissions

Re-authorize Your Git Integration Using An Admin User's Credentials

You can re-authorize your Git integration to LinearB using a user who does have admin rights to the relevant repositories, or perhaps a LinearB service account with proper permissions to the correct repos. This can be a complex process, don't hesitate to contact us for assistance in making this change.

The account that re-authenticates must to be an admin to the relevant repositories, AND needs access to all the repositories previously used by LinearB (otherwise, the Git integration might break!)

To re-authorize your Git integration, follow these steps:

  1. Make sure to log out of your Git account in your browser.
  2. Log into LinearB with a username that has LinearB admin access.
    1. Why? Only LinearB admin accounts have permission to reauthorize Git connections.
    2. Contact us to add a new admin account, this could be a service account (linearb@yourcompany.com, for example) or a different LinearB user who has elevated admin permissions.
  3. Click on the gear icon in the top right of your page, select Company Settings → Git
  4. Click on the menu icon to the right of your Git repositories, and select “Re-authorize”.
  5. You'll be prompted to connect a Git account.
    1. Connect the Git account which has the needed admin access to your repositories.
    2. Alternatively, you can enter a personal access token from this page to connect.
  6. VERY IMPORTANT Connect the Git account of the user who has both admin access to your repositories, and has access to all the repositories previously used by LinearB.

You've done it! You should now be able to connect LinearB to your Slack channels and also receive real-time updates on your personal pull requests and code reviews! Read more about connecting Slack below.

How do I connect and manage WorkerB Team Alerts?

How do I set up WorkerB Personal Alerts and Commands?

GitHub: Install an Org-Level Webhook

GitHub cloud users can install an org-level webhook in order to ensure that all current and all repos added in the future will be connected to LinearB in real-time. Instructions to connect an org-level webhook can be found here:

How did we do?

How do I add more repos to LinearB?

How do I exclude branches from my dashboards?

Contact