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

A way to manage all threads that a user has been subscribed to #633

Open
lamont-granquist opened this issue Apr 4, 2016 · 32 comments
Open

Comments

@lamont-granquist
Copy link

If you have a thousand threads that you've been subscribed to over the years, going through them all and clicking 'unsubscribe' is not particularly delightful UI. There needs to be a better way to access this information and a better way to bulk unsubscribe to threads. After years of being on GitHub, there are thousands of threads that I'm subscribed to. A lot of them are closed PRs and issues. Invariably new submissions to these threads are poor quality -- "was this ever fixed?"/"i'm seeing the same error message"/"help I'm lost" and my job actually isn't HelpDesk and I need to focus on the software development work that I need to get done. None of that helps me do the job in front of me, and I don't need it in my e-mail inbox. I would like some way of unsubscribing to all closed PRs and Issues that I'm subscribed to at a bare minimum. If users can't take the time to open a new issue, I don't have the time to attempt to filter through the noise to find the one person who legitimately is posting in an old thread that their problem was not solved, or some critical bug was introduced. I'm certain that by ignoring those people that there will be signal lost in the noise, but also confident that if its really a serious problem that someone else will open a new issue against the project eventually.

Through the UI there is no way currently to get the threads you are subscribed to. But you can through the API by hitting e.g.:

https://api.github.com/issues?filter=subscribed&state=closed

From there the problem is that the 'Unsubscribe' button is not accessible without a 'Thread ID' and the 'Thread ID' can only be determined after a notification shows up on the User's notification page. There's no way to resolve the subscribed threads into Thread IDs which is what the unsubscribe function through the API requires. There clearly is a call that lets the web page do the 'Unsubscribe' buttons work, but that is an AJAX call that requires a session ID and I don't quite grok how to fake out being a browser well enough to automate that.

What would be nice would be to at least:

  • get 'subscribed' issues exposed in the search UI on the web page
  • have a way to hit the 'unsubscribe' button via the API without knowing the Thread ID, or get the Thread ID into the information that the issues search page gives back
  • have a way in the UI to bulk unsubscribe to issues -- 'unsubscribe to all issues on this page' at a minimum or 'all issues returned by this search filter' would be nice -- if max pagination is 100 and you have 2,000 subscribed issues then unsubscribing page-by-page will still be a chore.
@TPS
Copy link
Collaborator

TPS commented Apr 12, 2016

#283, partially?

@lamont-granquist
Copy link
Author

lamont-granquist commented Apr 20, 2016

Yeah I think that issue is where I got the https://api.github.com/issues?filter=subscribed&state=closed query from.

Based on the help I got in this stack overflow question that I asked:

http://stackoverflow.com/questions/36506980/how-do-i-use-my-own-cookies-in-capybara

I wrote this script:

#!/usr/bin/env ruby

require 'selenium-webdriver'
require 'net/https'
require 'uri'
require 'json'
require 'pp'

def caps
  @caps ||= Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" => {"debuggerAddress" => "127.0.0.1:20480"}, detach: false)
end

def driver
  @driver ||= Selenium::WebDriver.for :chrome, :desired_capabilities => caps
end

def click_unsubscribe(uri)
  driver.navigate.to uri
  wait = Selenium::WebDriver::Wait.new(:timeout => 1)
  wait.until { driver.find_element(xpath: "//button[preceding-sibling::input[@value='unsubscribe' or @value='mute' or @value='subscribe']]") }
  element = driver.find_element(xpath: "//button[preceding-sibling::input[@value='unsubscribe' or @value='mute']]")
  element.click
  wait = Selenium::WebDriver::Wait.new(:timeout => 1)
  wait.until { driver.find_element(xpath: "//button[preceding-sibling::input[@value='subscribe']]") }
rescue Selenium::WebDriver::Error::NoSuchElementError
  puts "FAIL"
end

uri = 'https://api.github.com/issues?filter=subscribed&state=closed'
loop do
  u = URI.parse(uri)
  http = Net::HTTP.new(u.host, u.port)
  http.use_ssl = true

  headers = { "Authorization" => "token YOUNEEDTOPUTYOURAUTHTOKENHERE" }
  request = Net::HTTP::Get.new(u.request_uri, headers)
  response = http.request(request)
  json = JSON.parse(response.body)

  json.each do |issue|
    click_unsubscribe( issue['html_url'] )
  end

  uri = response['Link'].match(/<(\S+)>; rel="next",/)[1]
end

And if I fire up Chrome with:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/Users/lamont/Library/Application\ Support/Google/Chrome --profile-directory=Default --remote-debugging-port=20480

(and after hacking up selenium-webdriver like in that SO post to work around the bug it has when used with debuggerAddress)

Then it works for me, and I can iterate through all my closed issues that I'm subscribed to and unsubscribe to them all by automating the process of manually clicking on the webpage.

Included as an example of both how difficult this process is, and how badly I really want to do it...

@TPS
Copy link
Collaborator

TPS commented Apr 21, 2016

@lamont-granquist Wow… just wow! 🙇

@lamont-granquist
Copy link
Author

^ so this has been super-useful for reducing the noise in my day-to-day work. it gets me back on track being a software developer and reduces the helpdesk/bug tracking load.

unfortunately without #635 all my old closed issues are still open for comments, but i'm not watching them, so users who make comments there are effectively shadowbanned. as far as my day-to-day sanity goes i can't be bothered to care, but at a higher level i feel like a better experience for them would be to have those issues locked with a notice that new issues should be opened.

@TPS
Copy link
Collaborator

TPS commented Jun 29, 2016

So, according to https://github.com/blog/941-issues-dashboard via #283 (comment), this had been implemented — & then removed! 😖

@lamont-granquist
Copy link
Author

although still clicky and not implemented in the API, and without a bulk remove function in the Web UI.

@lamont-granquist
Copy link
Author

As an update, after writing the above hacky script and unsubscribing to all past closed issues I've found github e-mail to be substantially more pleasant and less aggravating because I'm not getting drive bys of angry users in closed issues every other day. I'm probably missing the odd "useful" e-mail, but I have vastly more things to do than I'll ever have time to get to and sooner or later someone will cut a new ticket or at-message me directly...

Would be nice to have the complementary script that locked all closed threads over X days because anyone posting on a closed thread is basically shadowbanned...

@TPS
Copy link
Collaborator

TPS commented Mar 12, 2019

So, resolved along w/ #283

@TPS TPS closed this as completed Mar 12, 2019
@lamont-granquist
Copy link
Author

Unless I'm missing something there's still no good way to select every merged PR / closed issue and mass-unsubscribe. Not even certain I see any way to unsubscribe from this at all. There is a list of them all now. That might make easier scripting possible, but I don't see anything directly in the UI after a bit of poking around. It might not be intuitive.

@TPS
Copy link
Collaborator

TPS commented Mar 12, 2019

What I see on https://github.com/notifications/subscriptions is checkboxes. When choosing any/all (via topmost ☑️), the option to the top right ↗️ becomes Unsubscribe. That's not what you're looking for?

@lamont-granquist
Copy link
Author

Nope.

I still need to be subscribed to a lot of ongoing things.

And I need to be able to select by current status, not the "Reason" why I was subscribed to it (I really don't care about the reason).

And if I tick the checkbox I get "25 selected |unsubscribe|" which is only the first page -- while I have well over the 1,000 subscriptions that it clips at.

So needs to have a way to select by closed issues/PRs, and needs to have a real mass-unsubscribe every single issue, not just a page.

I would guess I'm back up to 3,000 issues or more that I'd like to have go away and I don't want to page through 25 at a time.

@TPS TPS removed the implemented label Mar 12, 2019
@TPS
Copy link
Collaborator

TPS commented Mar 12, 2019

There've been comments to that effect @ #283, so I'll point here.

@TPS TPS reopened this Mar 12, 2019
@chiefjester
Copy link

I'm trying to somewhat use GitHub notifications, like the @lamont-granquist, I have more than 1,000+ subscriptions I'm still in the 2014 year, unsubscribing 25 would be very much a chore. I hope there's an API I can use to unsubscribe to all in one go and start using GitHub's notification.

@chiefjester
Copy link

I've ended up automating it via puppeteer 🤣. I'm still hoping they'll include a convenient way to select all and unsubscribe all. 😊

@ajorpheus
Copy link

@thisguychris Would you mind sharing your puppeteer script as a Gist, please?

I have had a quick look at https://github.com/transitive-bullshit/puppeteer-github, but it does not have anything related to Github Notifications. Thanks!

@chiefjester
Copy link

chiefjester commented Feb 4, 2020

Hey @ajorpheus you can check out the gist here

Just replace the USRDATA with your actual user data of chrome. This also assumes you're already logged in Github.

@wpostma
Copy link

wpostma commented Feb 14, 2020

FOUR YEARS after this issue is open there's still no way to manage all subscriptions from one page on github? Nice going GitHubbers.

@dcormier
Copy link

dcormier commented Feb 14, 2020

I think the solution to this is here: https://github.com/notifications/beta

@TPS
Copy link
Collaborator

TPS commented Feb 14, 2020

@dcormier FTFY

@chiefjester
Copy link

@TPS, @wpostma The new notifications Beta actually fixes this. There's now a way to max select notifications. 🙌🏻

image

@TPS
Copy link
Collaborator

TPS commented Feb 15, 2020

@thisguychris I've opted into βs for both Android app & mobile webviews. The notification β appears very similar in each, but shows no functionality beyond choosing upto those 25. Is this new feature limited to desktop⁈

@chiefjester
Copy link

@TPS first, why did you react such a negative way on my post trying to give good news? I don't have the Android or Mobile web views, but for Desktop Web App. It only appears if you click select all, basically if you have more than 25 items (on a 25 per page view). It'll suggest if you want to select the rest of the pages.

Mass subscribing isn't something you do repeatedly, you do it once in a blue moon, what's wrong in going to a desktop app and unsubscribing unwanted notifications once?

@TPS
Copy link
Collaborator

TPS commented Feb 15, 2020

@ThisGuyChris Firstly, no offense whatsoever meant to your good news, fwiw. But, in this day-&-age, rolling out even a β feature for desktop only is kinda like rolling out such for IE6-only — it marginalizes a large portion (perhaps even a majority) of those who actually need (& would happily test) it!

@chiefjester
Copy link

chiefjester commented Feb 15, 2020

@TPS I just checked mobile web view, and it does support mass unsubscribe from notifications:

image

So this is just a matter of different codebase, web app vs native app. Don't be mad. 😉

@lamont-granquist
Copy link
Author

Still don't think that solves this issue unless I'm missing something in the new UI.

I need to be able to bulk find all the issues which I'm currently subscribed to (even if there are zero notifications) and select all of the ones in the closed state and then bulk unsubscribe. It is a subscription-centric workflow, not notification-centric workflow that is desired. The subscription page still only lets one filter on the reason, not on the state, and doesn't allow bulk updates.

@chiefjester
Copy link

@lamont-granquist

I need to be able to bulk find all the issues which I'm currently subscribed to (even if there are zero notifications

They introduced a concept of inbox, even on closed state and read notifications stay on inbox. The first time I opened it I had a bunch of items on that list even if I've done reading them. So Subscriptions is basically a sublist of Inbox, since Inbox includes other aspects like ci-activity, invites, etc.

You can just filter it out is:issue-or-pull-request or something, to remove other notifications like ci-activity.

And that essentially makes the Unsubscribe button a mass unsubscribe button for subscribed issues.

P.S. I hope you all read the README of this repository (TLDR: this repo is not affiliated with Github). I'm just a user that happens to have the same annoyance, trying to help and share the good news.

@lamont-granquist
Copy link
Author

It isn't working that way for me, I only had ~100 notifications when opening up the beta, 35 of those are issues or PRs, that's compared to the 1,000+ subscriptions that I'm constantly on (probably many times that which I need to close).

@smolin
Copy link

smolin commented May 15, 2020

Still a problem. Need a way to bulk unsubscribe from subscriptions from an organization. In this image you can see that I have "1000+" subscriptions

image

but here you see I have only 32 notifications.

image

There's no equivalent "select all" link for subscriptions.

@alexanderadam
Copy link

Need a way to bulk unsubscribe from subscriptions from an organization.

There are already ways mentioned, like this or this in case you need something urgent.
I also have a small script that does this.

@janson
Copy link

janson commented May 22, 2021

It's 2021 and we still can't do this without faking a browser? 🤦

@d2khadka
Copy link

I went to here(https://github.com/watching) and there was a button to unwatch all repository.

@lamont-granquist
Copy link
Author

That removes the watches on the repo, it doesn't remove all the subscriptions to issues that have already been created by watching the repo.

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

10 participants