The Scenario
You are a build reliability engineer. The backend-service repo has been flaky for six weeks. Some branches fail consistently, others barely ever fail. Your engineering director wants a report by Thursday EOD showing which branches cause the most failures across the last 100 pipeline runs — pass/fail status, duration in seconds, and trigger per run.
The data is in Bitbucket's pipeline history. The UI shows runs one page at a time. There is no export button.
The bad version of this week:
- You open Bitbucket pipeline history for
backend-serviceand start copying rows into an Excel workbook - The UI shows twenty per page, so you page through five pages
- You accidentally include staging runs that should not be in the production reliability analysis
- You paste everything into a workbook tab and start writing COUNTIF formulas to get pass rates per branch
- The director wants duration in seconds, but Bitbucket shows "3m 42s" in the UI
- You spend forty-five minutes reformatting duration values
- Thursday arrives and three branches still have wrong duration values in the report.
The fast version is one prompt.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Excel workbook that fetches the pipeline history, converts the duration strings to seconds, and calculates pass rates by branch in the same prompt.
Open the SheetXAI sidebar and type:
List the last 100 pipeline runs for Bitbucket repo 'backend-service' in workspace 'acme-corp'. Write pipeline number, branch, status, duration in seconds, and trigger in columns A through E of the Raw tab. On the Summary tab, write each unique branch name, total run count, pass count, fail count, and pass rate as a percentage, sorted descending by fail count.
SheetXAI fetches the pipeline history, converts duration strings to seconds, computes the per-branch summary, and populates both tabs.
What You Get
Two tabs:
Raw tab:
- Pipeline number — the run ID
- Branch — which branch triggered the run
- Status — passed, failed, or stopped
- Duration in seconds — converted from the "Xm Ys" display format
- Trigger — manual, push, scheduled, or pull request
Summary tab:
- Branch — each unique branch
- Total, pass, fail counts — split by outcome
- Pass rate — as a percentage, sorted by fail count descending
The worst-offending branches are at the top. If feature/payments-refactor failed eight of ten runs, it is row one.
What If the Data Is Not Quite Ready
Pipeline history from Bitbucket has edge cases in real reliability workbooks.
When the duration field is missing for some runs
Stopped runs sometimes have no duration. You want those flagged rather than silently dropped.
List the last 100 pipeline runs for Bitbucket repo 'backend-service' in workspace 'acme-corp'. Write pipeline number, branch, status, and duration in seconds in columns A through D of the Raw tab. If a run has no duration, write 0 in column D and write "No duration" in column E. Otherwise leave column E blank.
When you want to filter to push-triggered runs only
The reliability concern is about push-triggered failures, not manual or scheduled runs.
List the last 100 pipeline runs for Bitbucket repo 'backend-service' in workspace 'acme-corp'. Filter to push-triggered runs only. Write branch, status, duration in seconds, and created date in columns A through D of the Raw tab. On the Summary tab, show pass rate per branch for push-triggered runs only.
When the director wants to see trend over time rather than aggregate rates
Pass rate per branch is useful, but the director also wants to know if things are getting better or worse week by week.
List the last 100 pipeline runs for Bitbucket repo 'backend-service' in workspace 'acme-corp'. Write branch, status, duration in seconds, and created date on the Raw tab. On the Trend tab, calculate the weekly pass rate for the top 5 most-run branches using the created date to group by week.
When you need two repos compared side by side in the same workbook
The director wants backend-service and api-gateway compared in one report.
Pull the last 100 pipeline runs for Bitbucket repo 'backend-service' and the last 100 for 'api-gateway', both in workspace 'acme-corp'. Write branch, status, duration in seconds, and repo name for all 200 runs on the Raw tab. On the Summary tab, show pass rate per repo and per branch across both, sorted by fail count descending.
The pattern: the reliability report, the trend view, and the cross-repo comparison all come from one prompt. You are not building pivot tables after the fact.
Try It
Get the 7-day free trial of SheetXAI and ask it to pull pipeline run history for any Bitbucket repo and calculate pass rates by branch in Excel. The Bitbucket integration is included in every SheetXAI plan. For related workflows, see how to build a repository inventory in Excel or the Bitbucket in Excel overview.
