Skip to content

Instantly share code, notes, and snippets.

@jacobkahn
Created January 18, 2020 17:59
Show Gist options
  • Save jacobkahn/e26f65abcce89a785c5ec3a6786152c2 to your computer and use it in GitHub Desktop.
Save jacobkahn/e26f65abcce89a785c5ec3a6786152c2 to your computer and use it in GitHub Desktop.
Unsubscribe from Repositories in an Org v2
function unwatchOrgRepos(orgName, repoNameFirstFourChars) {
var titleString = orgName + "/" + repoNameFirstFourChars;
var repoItems = document.querySelectorAll(".Box-row")
repoItems.forEach(function (item) {
var repoOrgElement = item.querySelector("a");
if (repoOrgElement && repoOrgElement.innerText.includes(titleString)) {
item.querySelector('.float-right').querySelector('button[value=ignore]').click()
console.log("Unwatched " + repoOrgElement.innerText);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment