Skip to content

Instantly share code, notes, and snippets.

@ssova-4xxi
Last active August 2, 2016 14:22
Show Gist options
  • Save ssova-4xxi/d21ced3d0a81bb4e7ff7891acdab2631 to your computer and use it in GitHub Desktop.
Save ssova-4xxi/d21ced3d0a81bb4e7ff7891acdab2631 to your computer and use it in GitHub Desktop.
Delete merged and closed branches github

Remove ,.state-closed to delete only merged

document.querySelectorAll('.state-merged,.state-closed')
.forEach(item => {
item.parentNode.parentNode.getElementsByClassName('branch-delete')[0].dispatchEvent(new Event('click'))
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment