/
/
Find the commit that broke each GitHub Actions workflow
For developers facing red builds across a repository who want each failure traced to where it started, by asking their AI assistant.
On this page
Connector
Connect GitHub, pick your AI tool and paste the prompt.
The problem
Which commit started each red build
When GitHub Actions turns red across a repository, the question is which commit started each failure and whether it is a real break or a flaky workflow. Answering means walking run histories branch by branch.
Without PopdockAI
- Open each failing workflow's history
- Find the last success on each branch
- Read the commit that came after it
- Chase flaky runs as real breaks
With PopdockAI
- Failed runs are grouped by workflow and branch
- The last success and the breaking commit are found with author
- Fixed pairs and same commit flips are labelled
- Error messages are never invented, and nothing is changed
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Diagnose the failed GitHub Actions runs in `{repository}` over the last `{lookback-days}` days (default 7), optionally only for the workflow named `{workflow-name}`, and identify where each failure started.
**Step 1: Find the failures**
Call `github-get-workflow-run` with company `{repository}`, conclusion `failure`, created-date.from set to today minus the lookback, name set to `{workflow-name}` when it is given, and max-records 100. Group the results by workflow name and branch.
**Step 2: Find where each failure started**
For each workflow and branch pair, call `github-get-workflow-run` again with the same name and branch and no conclusion filter, over the same window. Order by run-number and find the last run with conclusion `success` before the first failure. The run straight after it is the breaking run.
* If the latest run on that branch succeeded, the failure is already fixed; say so and deprioritise it.
* If failures alternate with successes on the same sha, treat it as a flaky workflow, not a code break.
**Step 3: Identify the breaking change**
For the breaking run, take its sha and call `github-get-commit` with sha set to it to get the author-name, author-email and full message. Also call `github-get-workflow` with name set to the workflow to report its path and whether its status is still active.
**Step 4: Report**
For each workflow and branch still failing:
* workflow name, path, and branch
* failing run count, first failing run-number and its url
* the breaking commit: sha, author, message, commit-date
* verdict: broken by a commit, flaky, or already fixed
Finish with the list of workflows that need a person to look at them now.
**Rules & Guidelines:**
* This prompt is read-only. Do NOT call `github-rerun-workflow-run`, `github-cancel-workflow-run`, `github-enable-workflow`, `github-disable-workflow`, `github-add-issue` or `github-add-issue-comment`.
* The tools do not return job logs. Do not invent an error message; say that the log must be opened from the run url.
**Validation:**
* If no failed runs are returned, report that there were no failures in the window and stop.
* If there is no successful run in the window before the first failure, say the break is older than the window and suggest a longer `{lookback-days}`.Who it's for
One answer, three teams that use it
Developers
Find the commit that broke the build
The breaking commit, author and message for each workflow and branch, in one answer.
Which commit broke the Test workflow on main in fabrikam/web this week?
DevOps engineers
Separate flaky workflows from real breaks
Runs that fail and pass on the same commit are labelled as flaky.
Are the GitHub Actions failures in contoso/api real breaks or flaky runs?
Tech leads
Assign build fixes quickly
Knowing who authored the breaking commit tells you who to ask.
Diagnose failed workflow runs in northwind/platform over the last 3 days.
How it works
What PopdockAI does when you ask
You name the repository and a period, and your AI assistant traces each failure to the commit that started it. It points you to the run log rather than guessing an error.
01
Ask
You name the repository, a lookback period and optionally a workflow.
02
Group
It groups failed runs by workflow and branch.
03
Trace
It finds the last success and the commit that broke after it, with author and message.
04
Report
You get breaking commits, flaky and fixed pairs labelled, and nothing changed.
What PopdockAI provides
The tools behind the answer
Ready made tools for GitHub and one secure connection to your AI tool. No code, no exports.
github-get-workflow-run
github-get-commit
github-get-workflow
This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.
The outcome
Breaking commits and flaky builds, sorted
Related use cases
More ways to put this data to work
One prompt template with infinite possibilities.
Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.
Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

.webp)
