Skip to content
This repository was archived by the owner on Nov 18, 2021. It is now read-only.
This repository was 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

Description

@lamont-granquist

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.

Activity

  1. TPS commented on Apr 12, 2016

    @TPS
    Collaborator

    #283, partially?

  2. lamont-granquist commented on Apr 20, 2016

    @lamont-granquist
    Author

    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...

  3. TPS commented on Apr 21, 2016

    @TPS
    Collaborator

    @lamont-granquist Wow… just wow! 🙇

  4. lamont-granquist commented on May 16, 2016

    @lamont-granquist
    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.

  5. TPS commented on Jun 29, 2016

    @TPS
    Collaborator

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

  6. lamont-granquist commented on Jun 29, 2016

    @lamont-granquist
    Author

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

  7. lamont-granquist commented on Jun 29, 2016

    @lamont-granquist
    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...

  8. TPS commented on Mar 12, 2019

    @TPS
    Collaborator

    So, resolved along w/ #283

  9. lamont-granquist commented on Mar 12, 2019

    @lamont-granquist
    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.

  10. TPS commented on Mar 12, 2019

    @TPS
    Collaborator

    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?

  11. 9 remaining items

  12. dcormier commented on Feb 14, 2020

    @dcormier

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

  13. TPS commented on Feb 14, 2020

    @TPS
    Collaborator
  14. chiefjester commented on Feb 15, 2020

    @chiefjester

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

    image

  15. TPS commented on Feb 15, 2020

    @TPS
    Collaborator

    @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⁈

  16. chiefjester commented on Feb 15, 2020

    @chiefjester

    @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?

  17. TPS commented on Feb 15, 2020

    @TPS
    Collaborator

    @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!

  18. chiefjester commented on Feb 15, 2020

    @chiefjester

    @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. 😉

  19. lamont-granquist commented on Feb 15, 2020

    @lamont-granquist
    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.

  20. chiefjester commented on Feb 16, 2020

    @chiefjester

    @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.

  21. lamont-granquist commented on Feb 16, 2020

    @lamont-granquist
    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).

  22. smolin commented on May 15, 2020

    @smolin

    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.

  23. alexanderadam commented on May 15, 2020

    @alexanderadam

    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.

  24. janson commented on May 22, 2021

    @janson

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

  25. d2khadka commented on Aug 17, 2021

    @d2khadka

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

  26. lamont-granquist commented on Aug 22, 2021

    @lamont-granquist
    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions