Connectors

/

GitHub

/

Re-run a failed GitHub workflow
Write

Re-run a failed GitHub workflow only when it can help

For developers who want to stop blind re-runs, by asking their AI assistant to check whether a re-run makes sense first.

Try PopdockAI free
Get a live demo
Re-run a failed GitHub workflow
Re-run the latest failed Integration tests workflow on main in contoso/api.
The latest Integration tests failure on main can be re-run. - Run: 4821, failed 25 minutes ago - Commit: f1e2d3c by Sam Patel, Add retry to payments client - Newer runs: none passed or queued since - History: first failure on this commit Shall I re-run it once?
GitHub
Sample figures. Your results come from your own account.
github-get-workflow
github-get-workflow-run
github-rerun-workflow-run

On this page

The problem

The problem

The prompt

Who it's for

How it works

Tools used

Connector

GitHub

GitHub
Run it on your own GitHub data.

Connect GitHub, pick your AI tool and paste the prompt.

Try PopdockAI free

The problem

Blind re runs hide real breaks behind a green tick

Re running a failed GitHub Actions workflow is the reflex fix, but often a newer run already passed or is queued, or the same commit has failed three times. Blind re runs waste minutes and hide real breaks.

Without PopdockAI

  • Click re run on the failed workflow
  • Miss that a newer run already passed
  • Re run a commit that fails every time
  • Celebrate a lucky green tick

With PopdockAI

  • The workflow is checked active and its latest failed run found
  • It declines when a newer run passed or is queued
  • Commits failing three or more times get a warning
  • One re run after you confirm, never in a loop

The prompt

Use this prompt

Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.

Prompt
**Objective:** Decide whether the latest failed run of `{workflow-name}` in `{repository}`, on branch `{branch}` when given, should be re-run, and re-run it only after the user confirms.

**Step 1: Check the workflow**

Call `github-get-workflow` with company `{repository}` and name `{workflow-name}`. If its status is not `active`, say it is disabled and stop; a re-run will not help.

**Step 2: Find the run**

Call `github-get-workflow-run` with company `{repository}`, name `{workflow-name}`, branch `{branch}` when given, and max-records 20. Find the most recent run with conclusion `failure`.

* If a newer run on the same branch already succeeded, say so and do not re-run.
* If a newer run is queued or in_progress, say so and do not re-run.
* If the same sha has already failed three or more times, say it is unlikely to be flaky and recommend fixing the code instead. Only continue if the user insists.

**Step 3: Confirm**

Show the run-number, branch, sha, commit-message and url, and ask the user to confirm the re-run.

**Step 4: Re-run**

Call `github-rerun-workflow-run` once, passing the run's workflow-run-id as run-id. Then call `github-get-workflow-run` with run-number set to it and report its new status.

**Rules & Guidelines:**

* Re-run one run at most. Never loop re-runs.
* Do NOT call `github-cancel-workflow-run`, `github-enable-workflow` or `github-disable-workflow`.

**Validation:**

* If no failed run is found, report the latest run's conclusion and stop.
* If `{workflow-name}` matches no workflow, call `github-get-workflow` with name.contains and list the close matches.

Who it's for

One answer, three teams that use it

Developers

Re run a flaky job safely

See the run details and re run once, knowing a newer run has not already passed.

Re run the latest failed Unit tests workflow on my feature branch in fabrikam/app.

DevOps engineers

Stop wasting runner minutes

Re runs are declined when they would not help, saving minutes for real work.

Should I re run the failed E2E workflow on main in contoso/web, or is something already queued?

Tech leads

Spot failures that need a code fix

A warning for repeat failures on the same commit tells you a re run will not fix it.

Re run the failed Build workflow in northwind/api unless that commit keeps failing.

How it works

What PopdockAI does when you ask

You name the workflow and optionally a branch, and your AI assistant checks whether a re run can help. It re runs at most once after you confirm and reports the new status.

01

Ask

You name the workflow and optionally a branch.

Your AI tool

02

Check

It confirms the workflow is active and finds its latest failed run.

github-get-workflow
github-get-workflow-run

03

Decide

It declines if a newer run passed or is queued, and warns about repeat failures.

github-get-workflow-run

04

Confirm

You see the run details and it re-runs once on your yes.

Your AI tool

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.

get-data

github-get-workflow

Returns the GitHub Actions workflows defined in a repository. Filter by name, file path and state (active or disabled).
get-data

github-get-workflow-run

Returns GitHub Actions workflow runs with their status and conclusion. Filter by workflow name, run number, branch, triggering event, status, conclusion and created date range.
run-action

github-rerun-workflow-run

Re-runs a completed GitHub Actions workflow run, identified by run ID.
Read only.Nothing in GitHub Changes

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.

How Popdock AI secures your data

The outcome

Re runs only when they can help

Try PopdockAI free
Get a live demo

Related use cases

More ways to put this data to work

All Ramp use cases

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.

Try PopdockAI Free
See Documentation