How to unwatch multiple repos easily on github?
Native JS version of a previous answer. Navigate to https://github.com/watching and then run:
Oneliner:
Array.prototype.slice.apply(document.querySelectorAll('.js-subscription-row')).forEach(el => { const org = el.querySelector('a[href^="/YOUR_ORG"]'); if (org) el.querySelector('button').click()})
Unwrapped:
const org = 'YOUR_ORG'
const query = document.querySelectorAll('.js-subscription-row')
const rows = Array.prototype.slice.apply(query)
rows.forEach(function (el) {
const org = el.querySelector('a[href^="/' + org + '"]')
if (org) el.querySelector('button').click()
})
Organisation specific
If you just want to unwatch repos from a single organisation, you can use this from https://github.com/watching
$('.js-subscription-row').each(function(){
var isYourOrganisation = $(this).find("a[href^='/YOUR_ORG']");
if(isYourOrganisation.length){
$(this).find('button:contains("Unwatch")').click();
}
});
Substitute YOUR_ORG
with whatever your organisation is called.
For the lazy, one can do this without the API reasonably quickly at this url: https://github.com/watching
A clean simple list, click click click click.
Additionally, there's a box that is golden. Uncheck it to not automatically be set to watch all repos you're given push access to. Hooray for managing the signal to noise ratio.