Back to Bitbucket in Google Sheets
SheetXAI logo
Bitbucket logo
Bitbucket · Google Sheets Guide

Measure Bitbucket Pull Request Review Velocity in a Google Sheet

2026-05-13
4 min read
See the Excel version →

The Scenario

You are an engineering manager. Your 90-day retrospective is next Friday and you want to show the team concrete data on review velocity: specifically, how long pull requests sit between creation and first approval for the backend-api repo. You want the last 60 merged PRs as the data set.

This is not a question you can answer from Bitbucket's UI. Bitbucket shows PR activity in a timeline inside each individual PR. To get time-to-first-approval, you would need to open each of the 60 PRs, find the first approval activity event, calculate the gap from the creation timestamp, and paste a row.

The bad version of this week:

  • You open the first merged PR for backend-api, find the approval timestamp in the activity log, subtract the creation timestamp, convert to hours, paste a row
  • You open the second PR and repeat
  • By PR twelve your spreadsheet formula for the time difference is off because one timestamp was in UTC and one was in your local timezone
  • By PR twenty you still have forty to go and the retrospective is Thursday
  • You go into the retro with twelve PRs worth of data and say "the rest of the analysis is still in progress."

The fast version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your Google Sheet that fetches PR activity for all 60 merged PRs, identifies the first approval event per PR, calculates the hours-to-first-approval, and writes the complete dataset in one pass.

Open the SheetXAI sidebar and type:

Get the last 60 merged pull requests for Bitbucket repo 'backend-api' in workspace 'acme-corp'. For each PR, write PR title, author, creation date, merge date, number of review comments, and hours from creation to first approval in columns A through F. Sort by hours-to-first-approval descending so the slowest reviews are at the top.

SheetXAI fetches each PR's activity log, finds the first approval event, computes the duration in hours, and writes the full table. The PRs with the longest review cycle are at the top.

What You Get

A review velocity dataset ready for the retrospective:

  • PR title — what the review was for
  • Author — who opened the PR
  • Creation date — when review started
  • Merge date — when it closed
  • Review comment count — the volume of discussion
  • Hours to first approval — the core metric, calculated from the activity log

All 60 merged PRs, with the velocity metric calculated. Not twelve with a note saying the rest are in progress.

The slowest reviews sit at the top. If one PR sat for 72 hours before anyone approved, that is the opening data point for the retro.

What If the Data Is Not Quite Ready

PR activity data from Bitbucket has a few edge cases that come up in real velocity analyses.

When some PRs were approved without review comments

You want to distinguish between fast-approval-because-the-team-trusted-it and fast-approval-because-nobody-looked.

Get the last 60 merged PRs for Bitbucket repo 'backend-api' in workspace 'acme-corp'. Write title, author, hours-to-first-approval, and review comment count in columns A through D. In column E, write "No comments" if review comment count is 0, and leave it blank otherwise. Sort by hours-to-first-approval descending.

When you want to see review velocity broken down by author

Some engineers get fast reviews because their changes are smaller or because their reviewers respond quickly. You want the per-author breakdown.

Get the last 60 merged PRs for Bitbucket repo 'backend-api' in workspace 'acme-corp'. Write the full dataset — title, author, hours-to-first-approval — on the Raw tab. On the By Author tab, for each unique author write their name, total PRs merged, and average hours-to-first-approval, sorted ascending by average time.

When you want to exclude PRs that were merged without an approval

Some PRs get merged by an admin without a formal approval event. Including them would skew the average down.

Get the last 60 merged PRs for Bitbucket repo 'backend-api' in workspace 'acme-corp'. Exclude any PR that was merged without a recorded approval event. Write title, author, hours-to-first-approval, and review comment count in columns A through D.

When the retro also needs a week-by-week trend to show if velocity improved

The team wants to see whether review speed got better or worse over the 90-day window, not just the aggregate.

Get the last 60 merged PRs for Bitbucket repo 'backend-api' in workspace 'acme-corp'. Write the full dataset — title, author, creation date, hours-to-first-approval — on the Raw tab. On the Trend tab, group by week using the creation date, and for each week write the week start date, PR count, and average hours-to-first-approval, sorted chronologically.

The pattern: the raw velocity data and the trend view both come from one prompt. The retro slides write themselves from the two tabs.

Try It

Get the 7-day free trial of SheetXAI and ask it to pull merged PR activity from any Bitbucket repo and calculate review velocity. The Bitbucket integration is included in every SheetXAI plan. For related workflows, see how to export open pull requests for a sync or the Bitbucket in Google Sheets overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more