github-tools / github

A higher-level wrapper around the Github API. Intended for the browser.
BSD 3-Clause "New" or "Revised" License
3.59k stars 755 forks source link

Follow user follows yourself (same for unfollow) #553

Closed CodyGramlich closed 3 years ago

CodyGramlich commented 5 years ago

https://github.com/github-tools/github/blob/90fb78b2fb4b4e8e607d24a3dacc983caed2437e/lib/User.js#L182-L202

The username argument in these functions is not used. Instead, these requests attempt to follow or unfollow the authenticated user. Surprisngly, there are no errors when you attempt to follow yourself and the same status code is returned as if you were to follow someone else. However, if you make a request to follow yourself, you won't actually be listed as one of your followers.

CodyGramlich commented 5 years ago

513 This person ran into this problem.