Created
January 18, 2020 17:59
-
-
Save jacobkahn/e26f65abcce89a785c5ec3a6786152c2 to your computer and use it in GitHub Desktop.
Unsubscribe from Repositories in an Org v2
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 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