Created
August 7, 2019 12:39
-
-
Save azer/38dbf5c259a1fb6aa018b4f8668d04d7 to your computer and use it in GitHub Desktop.
Unwatch all repositories of an organization
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
(function () { | |
const org = 'ORG' | |
const nodes = document.querySelectorAll('.Box-row'); | |
const rows = [ ...nodes ]; | |
const orgRows = rows.filter((e) => e.innerText.startsWith(` ${org}/`)); | |
const orgUnsubButtons = orgRows.map(row => row.querySelector('button.select-menu-item[value="included')); | |
orgUnsubButtons.forEach(button => console.log(button.click())); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great! I only had to remove the leading space before
${org}/
to make it work for me.