Back to Bitbucket in Excel
SheetXAI logo
Bitbucket logo
Bitbucket · Excel Guide

Measure Bitbucket Pull Request Review Velocity in an Excel Workbook

The Scenario

You are an engineering manager. Your 90-day retrospective is next Friday and you want to present 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, in an Excel workbook on OneDrive where the team can add notes.

Bitbucket shows PR activity in a timeline inside each individual PR. There is no bulk export. Getting time-to-first-approval means opening each of the 60 PRs, finding the first approval event in the activity log, calculating the gap, and pasting a row into Excel.

The bad version of this week:

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

The fast version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your Excel workbook that fetches PR activity for all 60 merged PRs, identifies the first approval event per PR, calculates 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 of the Velocity tab. Sort by hours-to-first-approval descending so the slowest reviews appear first.

SheetXAI fetches each PR's activity log, finds the first approval event, computes the duration in hours, and writes the complete table.

What You Get

A review velocity dataset ready for the retrospective:

  • PR title — what was under review
  • Author — who opened the PR
  • Creation date — when review started
  • Merge date — when it closed
  • Review comment count — the discussion volume
  • Hours to first approval — the core metric, sorted descending

All 60 merged PRs, with the velocity metric calculated. The slowest review is the first row. 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 edge cases in real velocity workbooks.

When some PRs were approved without review comments

You want to distinguish fast-approval-because-the-team-trusted-it from 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 of the Velocity tab. In column E, write "No comments" if comment count is 0, and leave it blank otherwise. Sort by hours-to-first-approval descending.

When you want review velocity broken down by PR author

Some engineers get faster reviews because their changes are smaller or their reviewers respond quickly.

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.

When you want to exclude PRs merged without a formal approval event

Some PRs are merged by an admin without a recorded approval. Including them skews the average down.

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

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

The team wants to see whether review speed improved or worsened over the 90-day window.

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 in Excel. The Bitbucket integration is included in every SheetXAI plan. For related workflows, see how to export open pull requests for a sync in Excel or the Bitbucket in Excel overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

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

Learn more