Skip to content

Instantly share code, notes, and snippets.

@jdolitsky
Last active July 13, 2022 02:30
Show Gist options
  • Save jdolitsky/2753465e6c14b9fb22481853ad44dc87 to your computer and use it in GitHub Desktop.
Save jdolitsky/2753465e6c14b9fb22481853ad44dc87 to your computer and use it in GitHub Desktop.
Re-running failed GitHub Actions jobs

In JavaScript console, get a list of all failed GitHub Action run URLs:

x=document.getElementsByClassName("merge-status-item");for (i=0;i<x.length;i++) { y=x[i].querySelector(".merge-status-icon");if (y && y.querySelector(".color-fg-danger")){console.log(x[i].querySelector(".status-actions").href)}}

Then on each individual run page, to re-run all failed jobs:

document.getElementsByClassName("rerun-dialog")[0].querySelector("summary").click();setTimeout(function(){z=document.getElementsByClassName("overflow-auto")[0].querySelectorAll('button');z[z.length-1].click()}, 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment