Last active
June 28, 2022 00:31
-
-
Save elstgav/e79ac1bee0dc2460c21f6709aa590940 to your computer and use it in GitHub Desktop.
Delete all merged and closed GitHub PRs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelectorAll('.State--closed,.State--merged').forEach((node, index) => { | |
setTimeout( | |
() => node | |
.closest('.Details-content--shown') | |
.querySelector('.js-branch-delete-button') | |
.click(), | |
600 * index, | |
) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simply paste this in the console and run while viewing stale branches, e.g.
https://github.com/your/repo/branches/stale