The Scenario
You are a build reliability engineer. The backend-service repo has been flaky for six weeks. Some branches seem to fail consistently, others barely ever. 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, and trigger per run.
The data is in Bitbucket's pipeline history. Bitbucket shows it run by run in the UI. There is no "export to spreadsheet" option, and the UI does not let you group by branch or calculate pass rates.
The bad version of this week:
- You open Bitbucket pipeline history for
backend-serviceand start copying rows - The UI shows twenty per page, so you click through five pages
- You accidentally include some staging runs in what should be a production-only analysis
- You paste everything into a sheet and start writing COUNTIF formulas to get pass rates by branch
- The director asks for duration in seconds, not the "3m 42s" format Bitbucket shows in the UI
- You hate the COUNTIF formula by the time you finish rewriting it for the fourth branch
- Thursday comes and the report still has three branches with wrong duration values.
The fast version is one prompt and the analysis is done before lunch.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Google Sheet that pulls the pipeline history from Bitbucket, parses the duration format, and calculates the pass rates for you 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 on the Raw tab. On the Summary tab, write each unique branch name, its total run count, pass count, fail count, and pass rate as a percentage, sorted descending by fail count.
SheetXAI fetches the pipeline history, converts the 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 Bitbucket's "Xm Ys" display format
- Trigger — manual, push, scheduled, or pull request
Summary tab:
- Branch name — each unique branch that ran at least once
- Total runs — how many times it ran
- Pass count / fail count — 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 out of ten runs, it is the first row.
What If the Data Is Not Quite Ready
Pipeline history data from Bitbucket has a few rough edges that come up in real reliability reviews.
When the duration field is missing for some runs
Runs that were stopped manually sometimes show no duration. You want those flagged rather than silently excluded from the average.
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. 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 a specific trigger type
Your reliability concern is specifically about push-triggered runs, not manual or scheduled ones.
List the last 100 pipeline runs for Bitbucket repo 'backend-service' in workspace 'acme-corp'. Filter to runs triggered by a push only. Write branch, status, duration in seconds, and created date in columns A through D. 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 column to group by week.
When you need to compare two repos side by side
The director wants backend-service and api-gateway compared in the same 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 repos combined, sorted by fail count descending.
The pattern: the reliability report, the trend view, and the cross-repo comparison all happen in the prompt layer. 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. The Bitbucket integration is included in every SheetXAI plan. For related workflows, see how to build a repository inventory or the Bitbucket in Google Sheets overview.
