refined-github icon indicating copy to clipboard operation
refined-github copied to clipboard

Allow following a repo releases in 2 clicks

Open fregante opened this issue 3 years ago • 4 comments

Description

I think generally I only follow releases on repos, so I think it should be easier to do that. Currently it requires 4 clicks but maybe we can reduce it to two.

Related

  • #3005

Before

Screen Shot 5Screen Shot 6

After

Screen Shot 7

Example URLs

https://github.com/refined-github/refined-github

fregante avatar Oct 19 '22 04:10 fregante

I would love if #3005 was done first

yakov116 avatar Oct 19 '22 14:10 yakov116

I think this would work great on the Releases page as a "Follow releases" button, especially now that the Watch dropdown is relegated to the Code tab.

It could work as a one-way button, if you're not following the repo:

Screenshot

If you're following the releases OR "every event in the repo", show the status, but disabled:

Screenshot 6

Then somehow we can inform the user that they can unfollow the repo or change the watch status in the Code tab.

This is because if the user is following the whole repo, we can't just unfollow the releases.

This button can probably be built directly via API:

  1. fetch status via API
  2. create button
  3. on click, post to API
    1. update+disable button

fregante avatar May 15 '23 19:05 fregante

I looked into this, it doesn't look like neither the REST nor the GQL API offers even a way to check whether the user is subscribed to releases. Subscriptions are handled everywhere as yes | no | ignored. "Repo releases" are not a "subscribable entity" either.

  • rest: https://docs.github.com/en/rest/activity/watching?apiVersion=2022-11-28#set-a-repository-subscription
  • gql: https://docs.github.com/en/graphql/reference/mutations#updatesubscription

So on the repo root:

  1. check the DOM
  2. submit the specific form and authenticity_token found

On the releases page:

  1. Fetch the repo root first
  2. same
  3. same

fregante avatar Nov 22 '23 11:11 fregante