Pull Request Reviews


Pull Request Reviews provide a comparison of a Site monitored in Calibre and a preview deployment. You can use Pull Request reviews to compare between a branch and your live Site, before changes are merged.

Each Pull Request Review tests preview deployments using the same conditions as your Site. This includes the same test location, authentication, headers, cookies, Test Profiles, and Pages. You can override authentication, headers, and cookies if needed.

Prerequisites

Each deployment must have a unique hostname (e.g.: my-preview-url-123.example.com) in order to use Pull Request reviews.

Create a Pull Request Review#

Read Sites, Start Pull Request Reviews

# This command will:
# - Block until performance tests have been completed (`--waitForResult`)
# - Return a failure if this PR fails specified performance budgets (`--failOnUnmetBudget`)
# - Write `comparison_report.md`, a markdown formatted Performance report
calibre site create-pull-request-review \
  --site="calibre" \
  --title="(fix): Reduce bundle size" \
  --url="https://my-pr-123.example.com" \
  --branch="$(git rev-parse --abbrev-ref HEAD)" \
  --sha="$(git rev-parse HEAD)" \
  --waitForResult \
  --failOnUnmetBudget \
  --markdown > comparison_report.md

You can read CLI documentation for calibre site create-pull-request-review here.

View an existing Pull Request Review#

Read Sites

# Pro tip: Add the --markdown flag for Markdown,
# or --json flag for JSON output
calibre site pull-request-review \
  --site="my-calibre-site-slug" \
  --branch="fix/reduce-bundle-size"

You can read CLI documentation for calibre site pull-request-review here.

List Pull Request Reviews#

Read Sites

calibre site pull-request-reviews --site <site>
Example response#
TITLE                                     | BRANCH                     | SHA      | STATUS    | CREATED
[UI] Add new dropdowns                    | feat/new-dropdowns         | 8de2a10… | completed | 6:15PM 6-Sep-2023
[Perf] Add lightbox alternative           | perf/remove-lightbox       | 05ae42a… | completed | 3:52PM 25-Aug-2023
[UI] Migrate menus from Reach to Radix…   | migrate-from-reach-menu    | 241ccbb… | completed | 4:48PM 22-Aug-2023
[Docs] Update FAQs                        | docs/update-faqs           | 78f9a44… | completed | 5:31PM 15-Aug-2023

You can read CLI documentation for calibre site pull-request-reviews here.

On this page