Skip to content

Instantly share code, notes, and snippets.

@kinncj
Created April 9, 2018 16:21
Show Gist options
  • Save kinncj/33539b785eabfc8345b6d671a7bfab5d to your computer and use it in GitHub Desktop.
Save kinncj/33539b785eabfc8345b6d671a7bfab5d to your computer and use it in GitHub Desktop.
JS snippet to remove all github branches from a given tab - in my case, the Stale branches tab
(function(){
// Run at console from the Stale Branches tab.
var rawForms = document.querySelectorAll('.js-branch-destroy > button'),
forms = Array.from(rawForms);
console.log(forms);
forms.forEach(function(form){
console.log(form.click());
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment