Skip to content

Instantly share code, notes, and snippets.

@maschad96
Last active November 11, 2019 20:46
Show Gist options
  • Save maschad96/5edb9c161422d25dc2f40072e17ee015 to your computer and use it in GitHub Desktop.
Save maschad96/5edb9c161422d25dc2f40072e17ee015 to your computer and use it in GitHub Desktop.
Unwatch repositories belonging to organizations
1 - Navigate to github.om/watching
2 - Run the following in the browser
const rows = document.querySelectorAll('.Box-row');
rows.forEach(row => {
const name = row.querySelector('a').getAttribute('href');
const popover = row.querySelector('summary');
// If the name doesn't match our desired orgs to unwatch, return early
if ( ! name.match(/ORG1|OTHER_ORG/g) ) return;
popover.click();
const button = row.querySelector('button[value="ignore"]');
button.click();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment