Skip to content

Instantly share code, notes, and snippets.

@OleksiyRudenko
Last active March 7, 2019 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OleksiyRudenko/00be70f0915aea7affb18ab8c6e7c8c8 to your computer and use it in GitHub Desktop.
Save OleksiyRudenko/00be70f0915aea7affb18ab8c6e7c8c8 to your computer and use it in GitHub Desktop.
GitHub: Unsubscribe from organization's repos

Unsubscribing hack

Navigate to https://github.com/watching

Copy the code below and paste it into Dev Console in your browser Change 'ORG-NAME' as appropriate.

let targetOrg, query, rows;
targetOrg = 'ORG-NAME';
query = document.querySelectorAll('.js-subscription-row')
rows = Array.prototype.slice.apply(query)
rows.forEach(function (el) {
  const org = el.querySelector('a[href^="/' + org + '"]')
  if (org) el.querySelector('button').click()
})

Only visible repos would become unwatched. After the page refresh run the code above (remove a line starting with let ... as variables are already declared) once again to purge more subscriptions from the organization.

Based on the SO recipe

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