The Scenario
You are a QA lead. The payments-service repo has been going through a major refactor and you have been tasked with tracking whether the vulnerability count is trending down over the last 10 commits to main. Bitbucket stores code-quality report annotations on each commit — vulnerability count, coverage percentage, issue type, severity, and the file it was found in.
The data is attached to each commit in Bitbucket. To get it into a sheet for trend analysis, you would need to open each commit's report page, read the annotation data, and paste a row. Ten commits, multiple annotations each.
The bad version of this week:
- You open commit one in Bitbucket, navigate to the Reports tab, read the annotations
- You copy the annotation type, severity, and counts into a Google Sheet
- You open commit two and repeat
- By commit five you realize some commits have multiple reports from different tools (SAST, coverage, linting) and you are not sure which to use for the trend
- By commit eight the data is in the sheet but the column order from the copy differs between commits because you clicked in different sequences
- The trend chart you build is wrong because commits six and seven have the wrong severity mapping.
The fast version is one prompt.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Google Sheet that fetches commit reports and annotations via the Bitbucket API, handles the multi-report-per-commit structure, and writes a clean trend-ready dataset in one pass.
Open the SheetXAI sidebar and type:
For the last 10 commits on the main branch of Bitbucket repo 'payments-service' in workspace 'acme-corp', fetch all commit report annotations. Write commit hash, commit date, report type, annotation severity, file path, and annotation message into columns A through F. One row per annotation.
SheetXAI fetches the commit list, pulls all report annotations for each commit, and writes the flat annotation table with consistent column ordering across all commits.
What You Get
A flat annotation log with one row per finding:
- Commit hash — which commit the annotation belongs to
- Commit date — for sorting the trend chronologically
- Report type — SAST, coverage, lint, or whatever tools generated the report
- Severity — critical, high, medium, low, or info
- File path — where the issue was found
- Message — the annotation description
Consistent column order across all commits. No copy-paste mismatches from clicking in different sequences on different commit pages.
Want to pivot to a per-commit vulnerability count for the trend chart? Ask SheetXAI to add a Summary tab that groups by commit date and counts annotations by severity. It writes both views in the same prompt.
What If the Data Is Not Quite Ready
Code-quality annotation data from Bitbucket has a few edge cases in real QA workflows.
When you only want vulnerability-type annotations, not coverage or lint
The trend analysis is specifically about security vulnerabilities, not code style or test coverage.
For the last 10 commits on the main branch of Bitbucket repo 'payments-service' in workspace 'acme-corp', fetch all commit report annotations. Filter to annotations where the annotation type is 'VULNERABILITY'. Write commit hash, commit date, severity, file path, and message in columns A through E.
When you need the per-commit vulnerability count for a trend chart
The raw annotation log is useful for drilling in, but the chart needs one row per commit with a total count.
For the last 10 commits on the main branch of Bitbucket repo 'payments-service' in workspace 'acme-corp', fetch all commit report annotations of type 'VULNERABILITY'. Write the full annotation list on the Raw tab. On the Trend tab, write commit hash, commit date, and the count of VULNERABILITY annotations per commit, sorted chronologically. Add a column for the count of CRITICAL-severity annotations specifically.
When some commits have no reports at all
Not every commit triggers a full scan. You want those commits represented in the trend with a zero count rather than a gap.
For the last 10 commits on the main branch of Bitbucket repo 'payments-service' in workspace 'acme-corp', fetch all commit report annotations. On the Trend tab, write one row per commit even if it has zero annotations. Write commit hash, commit date, and annotation count (0 if none), sorted chronologically.
When the QA director wants the coverage percentage trend alongside the vulnerability count
The director wants both security and coverage trending together in one view.
For the last 10 commits on the main branch of Bitbucket repo 'payments-service' in workspace 'acme-corp', fetch all commit reports and annotations. Write the full annotation log on the Raw tab. On the Trend tab, write one row per commit showing commit hash, commit date, VULNERABILITY annotation count, CRITICAL annotation count, and the coverage percentage from the coverage report. Sort chronologically.
The pattern: the annotation log and the trend summary both come from one prompt. The QA director gets the drill-down view and the trend chart data without a second pass through the Bitbucket UI.
Try It
Get the 7-day free trial of SheetXAI and ask it to pull code-quality report annotations from any Bitbucket repo into a blank Google Sheet. The Bitbucket integration is included in every SheetXAI plan. For related workflows, see how to export pipeline run history for reliability analysis or the Bitbucket in Google Sheets overview.
