Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Unsubscribe from all/selected repository notifications #641

Open
leegee opened this issue Apr 8, 2016 · 38 comments
Open

Unsubscribe from all/selected repository notifications #641

leegee opened this issue Apr 8, 2016 · 38 comments

Comments

@leegee
Copy link

leegee commented Apr 8, 2016

Steps to reproduce:

  1. Take your third short-term contract in a year
  2. Talk them into subscribing to GitHub / get corp GitHub access
  3. Get subscribed to 100+ repositories
  4. Spend an hour clicking through each to unsubscribe from each repo's notifications

Please make it easier.

@cirosantilli
Copy link
Collaborator

More precisely, do you want to unsubscribe from all repositories of a given organization?

@TPS
Copy link
Collaborator

TPS commented Apr 10, 2016

Duplicates #633?

@cirosantilli
Copy link
Collaborator

@TPS I'd rather keep this open, since #633 is too broad, and this is more specific.

Also I think this is about unsub from a given organization at once (hopefully OP will confirm), which does not seem to be mentioned at #633 But it's hard to be sure, since that one is so huge.

Small specific issues rock.

@leegee
Copy link
Author

leegee commented Apr 10, 2016

Hopefully related :)

On Sun, 10 Apr 2016, 08:31 Ciro Santilli 六四事件 法轮功 包卓轩, <
notifications@github.com> wrote:

@TPS https://github.com/TPS I'd rather keep this open, since #633
#633 is too broad, and this is
more specific.

Also I think this is about unsub from a given organization at once
(hopefully OP will confirm), which does not seem to be mentioned at #633
#633 But it's hard to be sure,
since that one is to huge.

Small specific issues rock.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#641 (comment)

@madhatter215
Copy link

I experienced this just recently. Any chance that someone's working on a feature to unsubscribe all from an organization?

@acjh
Copy link

acjh commented Sep 12, 2017

Urgent? Run this on https://github.com/watching:

function unwatchOrgRepos(orgName) {
  var repoItems = document.querySelectorAll(".repo-list > li")
  repoItems.forEach(function (item) {
    var repoOrgElement = item.querySelector(".repo-name").previousElementSibling;
    var repoOrgName = repoOrgElement.innerText;
    if (repoOrgName === orgName) {
      var unwatchButton = item.querySelector(".js-unsubscribe-form > button");
      unwatchButton.click();
      var itemName = repoOrgElement.parentElement.innerText;
      console.log("Unwatched " + itemName);
    }
  });
}

Usage:

unwatchOrgRepos("test");

@joaomarceloods
Copy link

@acjh

+1 wish this feature

@GentryRiggen
Copy link

There is an "Unwatch all" button now on your github watching page now.

@Paskalouis
Copy link

Paskalouis commented Feb 6, 2019

Hi, I think this issue can be closed since I think @GentryRiggen 's solution is good enough.
Better to unwatch all then rewatch repos I want to watch instead of unsubscribe hundreds of repo.

@TPS TPS closed this as completed Mar 12, 2019
@Luc45
Copy link

Luc45 commented Mar 26, 2019

How do I Unwatch all from a specific organization only?

I had to run @acjh's script to achieve this, but there should be an official way to do this...

@timarmstrong
Copy link

I don't see an "Unwatch All" button and it looks like the page changed enough that some previous scripts didn't work for me. I managed to tweak one to work:
Array.prototype.slice.apply(document.querySelectorAll('.Box-row')).forEach(el => { const org = el.querySelector('a[href^="/ORG_NAME"]'); console.log(org); if (org) el.querySelector('button').click()})

@Paskalouis
Copy link

If the unwatch button is removed, would it better if this issue reopened again ?

@adi518
Copy link

adi518 commented Apr 11, 2019

The button was removed, they moved this feature to Settings. Now you have to go to: settings -> Notifications -> untick Automatically watch repositories.

@TPS TPS removed the implemented label Apr 11, 2019
@TPS
Copy link
Collaborator

TPS commented Apr 11, 2019

I'm not currently seeing the Unwatch All button or equivalent, so reopening. 😭

@TPS TPS reopened this Apr 11, 2019
@ericgroom
Copy link

Also running into this issue, I joined a new organization with hundreds of repositories and am only interested in one or two of them but am getting emails every 3-5 minutes with updates.

@jesusgn90
Copy link

Some users here didn't understand the problem, here is a picture of the same issue that I'm facing after leaving an organization where I participated in lot of the issues, PRs, etc

image

So I'm going every 25 notifications from more than 1000 😢

@benwillkommen
Copy link

When I got a new job, my profile settings wound up with me subscribed to every repo in their Github org (>600).

I had other subscriptions that I didn't want to lose, so I cobbled this together to delete subscriptions I had only in my new company's org.

https://gist.github.com/benwillkommen/b7549414883087923ad574d1e846c5f9

@jesusgn90
Copy link

Awesome @benwillkommen , this actually will help the whole community. I'll do my own with Node.js from your gist just for fun (of course I'll share it hahaha)

Thanks dude!

@andydempster
Copy link

@benwillkommen you are THE dude! Thank you so much!

@jetersen
Copy link

jetersen commented Mar 12, 2020

@benwillkommen pagination only worked if first page had a matching result. I improved using the response.links['next']['url'] see the comment on the gist.

@benwillkommen
Copy link

@jetersen I updated the gist. Thanks for the fix!

@DavidNemeskey
Copy link

@benwillkommen Thanks for the gist. Do you know what OAuth scopes are needed for it to work? notifications is not enough, I only see my own repos within the organization with it.

@jetersen
Copy link

@DavidNemeskey it is mentioned in the README as well 🤔 You need "repo"

@DavidNemeskey
Copy link

@jetersen Duh. I knew I should have learned to read... 😄

@k1sul1
Copy link

k1sul1 commented Apr 2, 2020

While scripts are nice and all, I'd rather use the UI, which was a hard find, but very useful after finding.

https://github.com/notifications/subscriptions removed 150+ subs in less than a minute.

@jetersen
Copy link

jetersen commented Apr 2, 2020

@k1sul1 the URL is not helpful for repo watching.
I have a lot of issues and pull requests that I want to be subscribed to

@zenspider
Copy link

This has bit me badly twice. The last one was so bad that the ghunwatch tool I found was hitting rate limits w/o making progress on unsubscribing me.

I've written this:

https://gist.github.com/zenspider/1db3199dabdfc14e20083a848f98d15d

that uses octokit.rb to unsubscribe to anything matching the org off of your authenticated user. This way it should always make progress regardless of rate limiting.

@zenspider
Copy link

I'd also like to say something I don't think I've seen in here:

First "Unwatch All" is NOT the solution. If it is actually all (I'm too scared to find out), then I lose everything I want to watch, which is currently ~225 projects. If it is only the things on that page (or the javascript "solutions" above), then yesterday I would have had to click that damn button 50 times (~2500 repos auto-watched and then several hundred notifications sent). Neither is a working solution. My script above addresses this but is still a fairly unwieldy hammer.

Second, this NEEDS to have a global setting for the user's preferences, plus per-organization overrides. It also NEEDS to have the ability to apply watch/unwatch to an entire org at a time.

Anything less than this is an unworkable mess that requires too much manual intervention and cuts into my productivity (and sanity).

@khionu
Copy link

khionu commented May 19, 2020

A single button to unwatch everything related to a single repo/org would be a great step, though, can always provide more fine tooling.

@zenspider
Copy link

@khionu I've done that via the gist above

@Mofef
Copy link

Mofef commented Jan 12, 2021

I managed to get the script of @acjh #641 (comment) working on the current version of https://github.com/watching

function unwatchOrgRepos(orgName) {
  var repoItems = document.querySelectorAll(".repo-list > li")
  repoItems.forEach(function (item) {
    var repoOrgElement = item.querySelector(".pr-3");
    var repoOrgName = repoOrgElement.innerText;
    if (repoOrgName.startsWith(orgName)) {
      var unwatchButton = item.querySelector("notifications-list-subscription-form [value=ignore]");
      dbg = unwatchButton;
      if (unwatchButton.value === "ignore"){
        unwatchButton.click();
        console.log("Unwatched " + repoOrgName);
      }
    }
  });
}

(Use at your own risk; my total live time experience with javascript sums up to less than 10 hours ;))

@rimiti
Copy link

rimiti commented Feb 9, 2021

@Mofef Thanks for the updated function. It works perfectly.

@janson
Copy link

janson commented May 22, 2021

Some users here didn't understand the problem, here is a picture of the same issue that I'm facing after leaving an organization where I participated in lot of the issues, PRs, etc
So I'm going every 25 notifications from more than 1000 😢

Emphasis mine. It's still a problem... and potentially toxic one as well. Let me explain:

  1. I join organization.
  2. Get subscribed to all the things.
  3. ??
  4. I leave organization.
  5. Why am I still subscribed to all the things?

If step three was a bad situation... then having to be reminded of the bad situation by getting daily notifications is an incredibly unwelcome intrusion. In my own case, it wasn't bad... but one can easily imagine a bad situation. And the only recourse is to spend hours (either manually, or cobbling together the right code based on whatever today's UI code is...) unsubscribing to old notification threads or nuke a whole profile?

I've left the org, I'm no longer on any teams on the org, and I've unwatched the repositories in question. Now I've still 1000+ only because an old team I used to be on was mentioned? Why?

This is not great. And not great for anyone likely to experience a bad situation in step 3.

@jetersen
Copy link

jetersen commented May 22, 2021

Nowadays you can turn off the automatic subscription when you join an org for instance.
https://github.com/settings/notifications

image

@TPS
Copy link
Collaborator

TPS commented May 22, 2021

So maybe this issue could be resolved with a corresponding setting to unsubscribe when those conditions are no longer met, & corresponding manual mass unsubscribe option for an entire repo, org, &c, on the appropriate pages.

@TPS TPS added the spam label May 22, 2021
@khionu
Copy link

khionu commented May 23, 2021

Mass unsubscribe buttons are exactly what we have been asking for

@scorpionking2k5
Copy link

How about going to https://github.com/settings/notifications > Custom Routing and using a defunct email address for the org you want to ditch.

@khionu
Copy link

khionu commented Jun 17, 2021

IP Tables for notifications... 😂

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests