The Calibre Agent
Pull Request Reviews
Main Thread Execution Timeline
Third Party Tracking
Pull Request Reviews allow you to see the performance impact of development work before it gets released to your customers. It’s a powerful GitHub integration that works with most popular deployment platforms.
To enable Pull Request Reviews, go to Site → Settings → Integrations tab and click Add to a repository in the GitHub section. You will be redirected to GitHub to enable the integration for your organisation.
Calibre requires access to commit statuses, deployments, checks and pull requests. We strongly recommend granting access to any selected repositories you’re interested in tracking.
After confirming the link between GitHub and Calibre, you will have to select a primary branch that will be the base for performance comparisons. This branch should be either deploying to production or a staging environment. In most cases, this might be main branch.
For the most accurate results, make sure you compare two very similar environments. Some of the common differentiators producing unreliable results can be using a CDN on production, but not on Pull Request deployments, or the presence of ads or other third parties.
When your Pull Request is merged and selected branch is successfully deployed, Calibre creates a deployment marker on your charts and takes a new snapshot of your Site. That way, you always know how releases affect your performance metrics.
Calibre will compare each Pull Request to the median of your site metrics since the last deploy. Each report highlights critical measurements (Lighthouse Performance Score, Time to Interactive and First Contentful Paint) overall and across Test Profiles to highlight top-level changes.
You can also analyse each page to see browser previews for specific Test Profiles and most significant changes, including any Budgets that have changed.
Pull Request Reviews provide a helpful performance overview directly in GitHub, with the ability to drill down into metrics further in the Calibre interface.
Your repository has to be using GitHub deployment statuses, so Calibre knows what to compare Pull Requests to. Providers such as Vercel, Netlify and Heroku provide these automatically.
If you have a custom CI pipeline, you can mark deployments and create deployment statuses using the GitHub API. Calibre creates a Pull Request Review Site when it receives a deployment status with a state of success. Make sure to set the canonical URL of your review Site in the environment_url field.
Calibre will create Pull Request Review tests from any GitHub deployment status. If your repository is creating several deployment environments in Pull Requests (e.g. in monorepo scenarios or when both Site and Storybook preview is created), we recommend choosing one of the following options in Site → Settings → Edit a GitHub Integration:
You can customise metrics and authentication settings by including a configuration YAML file in your linked repository at /.calibre/config.yml.
There are two top-level properties you must specify:
By default, Calibre will compare the following metrics:
|Metric type||Metric name|
|Paint||Largest Contentful Paint|
|Paint||Cumulative Layout Shift|
|Runtime||Total Blocking Time|
|Lighthouse Score||Lighthouse Performance Score|
|Paint||First Contentful Paint|
|Paint||First Meaningful Paint|
|Runtime||Time to Interactive|
|Runtime||JS Parse & Compile|
|Request||Total page transferred|
|Request||Total HTML transferred|
|Request||Total Image transferred|
|Request||Total Video transferred|
|Request||Total Font transferred|
|Request||Total JSON transferred|
|Request||Total CSS transferred|
|Request||Number of requests (Asset Count)|
Under pullRequestReviews in your configuration file you can explicitly define which metrics to use, or you can provide a list of metrics to ignore from all available metrics in Calibre.
When you define metrics, the first three will be shown in the summary table.
The following configuration will only compare the metrics listed under measurements:
1version: 12pullRequestReviews:3 measurements:4 - lighthousePerformanceScore5 - lighthouseAccessibilityScore6 - lighthouseSEOScore
The following configuration will include all metrics except the ones listed under ignore:
1version: 12pullRequestReviews:3 ignore:4 - lighthousePwaScore5 - pageHTMLDownload6 - timeToFirstByte7 - lighthouseSeoScore8 - pageWaitTiming
Calibre will copy your authentication settings to Pull Request Review tests. The authentication URL will be automatically updated with your deployment URL.
If you require specific authentication details for Pull Request Reviews, you can set them using config.yml.
The following configuration will be used for authentication:
1version: 12pullRequestReviews:3 authentication:4 url: https://different-domain.com/login5 username: email@example.com password: mysecretpassword7 formSelector: form8 usernameSelector: input[name=email]9 passwordSelector: input[type=password]
To use Pull Request Reviews, the following API access to your GitHub respository is required:
In addition to these API items, Calibre will also read the following events for authorised repositories:
Your team authorises access during installation and will be prompted to confirm any changes in access requirements.
If you have any questions or concerns, let us know at firstname.lastname@example.org.