Open AndreasBackx opened 8 years ago
So this is absolutely, IMO, something that should be reported to support@github.com
. If you can send them an email and CC me, that would be wonderful. We rely on their information to be correct for most things and when that fails, we try our best to not munge their values into correctness unless we absolutely have to.
The e-mail has been sent, we'll see what their opinion is.
So based on the (unsurprisingly) unhelpful conversation with GitHub support, it looks like we should move away from trusting any URLs that the GitHub returns to us and start constructing everything from scratch. 😢
Some requests like
/repo/:owner/:repo
return a users URL for an organization causing further use of the model Organization to act as a user. Requests likeOrganization.teams
built on top of that faulty url causing the url/users/:user/teams
which does not exist, it should be/orgs/:org/teams
.Example of what is returned for
/repos/:owner/:repo
:This string is set in BaseAccount. In my opinion this is an error in the GitHub API itself because it clearly states the dictionary value is an organization even though it uses user endpoints. It might be worth making an issue for the GitHub API. Currently I would set the
_api
field in code for theUser
andOrganization
models.