The client_id and client_secret URL variables,
containing sensitive app information, are leaked
to users if the Go error is returned to them. To
prevent this, sanitizeURL redacts the fields from
ErrorResponse's Error method. Therefore making the
error message safe to expose to users.
The RepositoryContent struct doesn't quite map to the API because it is
missing a download link. This link is very useful because while the API
doesn't allow large files to be downloaded, the link allows the raw
files to be downloaded outside the API.
Unfortunately this is a breaking change, and having a pointer to a slice
is not very common, but is needed in this case to allow clearing an
issue's labels.
Fixes#181
this method actually returns RepositoryCommits (go-github's term for
this, not GitHub's) rather than Commits. They are very, very close in
structure (which is likely why this has gone unnoticed for so long), one
of the primary differences being that RepositoryCommits exposes the
GitHub identity of the commit author and committer if possible.
These changes are strictly violations of any style guide (I don't
think?), but are just to make tests in go-github more consistent,
particularly in use of 'got' and 'want' vars. In doing this, I found
several places where those two got reversed in the error message (hint:
'got' always comes first in go)
okay, so these aren't really that useful buy hey, why not? :)
MMM. .MMM
MMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMM __________
MMMMMMMMMMMMMMMMMMMMM | |
MMMMMMMMMMMMMMMMMMMMMMM | Ship It! |
MMMMMMMMMMMMMMMMMMMMMMMM |_ ______|
MMMM::- -:::::::- -::MMMM |/
MM~:~ ~:::::~ ~:~MM
.. MMMMM::. .::::. .::MMMMM ..
.MM::::: ._. :::::MM.
MMMM;:::::;MMMM
-MM MMMMMMM
^ M+ MMMMMMMMM
MMMMMMM MM MM MM
MM MM MM MM
MM MM MM MM
.~~MM~MM~MM~MM~~.
~~~~MM:~MM~~~MM~:MM~~~~
~~~~~~==~==~~~==~==~~~~~~
~~~~~~==~==~==~==~~~~~~
:~==~==~==~==~~
A recent update to the GitHub API changed some undocumented behavior. Previously
a nonexistent base_tree and an empty string base_tree were treated the same, but
now the empty string case will fail with "422 base_tree is not a valid oid".