useful-forks / useful-forks.github.io

Improving GitHub's Forks list discoverability through automatic filtering. The project offers an online tool and a Chrome extension.
https://useful-forks.github.io/
MIT License
1.18k stars 61 forks source link

Why is `public_repo` scope requested? #30

Closed Jackenmen closed 3 years ago

Jackenmen commented 3 years ago

It seems like all the used API endpoints only use public data and therefore shouldn't need any scopes.

payne911 commented 3 years ago

@jack1142 Would you mind trying to create a token which doesn't have that scope and use it to see if the tool still works properly?

I believe that scope is necessary to obtain read access to public repositories through the token.

Jackenmen commented 3 years ago

It does work from what I can tell - I've only been using useful-forks in that way since it seemed weird to me to require the repo scope for read-only access of public repositories

payne911 commented 3 years ago

I just tested it out (since GitHub is rolling a new format for the tokens, I wanted to make sure everything still worked) : you are right.

At this point, I'm wondering what the public_repo scope is used for if not for that kind of use-case.

In any case, I'll update the code. Thanks for pointing this out!

Jackenmen commented 3 years ago

At this point, I'm wondering what the public_repo scope is used for if not for that kind of use-case.

It is used for write access to the repository (pushing code, making issues, etc.), stuff that is available without logging in doesn't require any scopes.

payne911 commented 3 years ago

It just says :

image

Its name should be more explicit. Anyways, thanks for bringing this to my attention.