3 ms·
What's tricky is that GitHub API docs[1] appears to explicitly recommend passing the username and not the ID. Both the GraphQL and the REST versions tell you to
by hardwaregeek 3y ago
What's tricky is that GitHub API docs[1] appears to explicitly recommend passing the username and not the ID. Both the GraphQL and the REST versions tell you to get a user by passing a username.
[1]: https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-a-user https://docs.github.com/en/rest/users/users?apiVersion=2022-...
- LoganDark 3y agoYeah, they seem really focused on usernames. The sad thing is that you shouldn't just figure out a user-ID-to-username endpoint because that just creates a TOCTOU opportunity. You have to have GitHub accept a user ID directly on the operation you want to perform with that user, or else something could change in between getting the username and operating on that username.