Skip to content

Instantly share code, notes, and snippets.

@azer
Created August 7, 2019 12:39
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save azer/38dbf5c259a1fb6aa018b4f8668d04d7 to your computer and use it in GitHub Desktop.
Unwatch all repositories of an organization
(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()));
})();
@tingstad
Copy link

tingstad commented Sep 1, 2020

Great! I only had to remove the leading space before ${org}/ to make it work for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment