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".
The release assets are included in the release object, but they are not being
parsed currently. To get the list of release assets, one must use
ListReleaseAssets, which is one extra unnecessary HTTP request.
This commit adds Assets field to RepositoryRelease struct so that the release
assets are immediately available right after calling ListReleases.
Signed-off-by: Ondřej Kupka <ondra.cap@gmail.com>
The git ref methods were mostly written to not expect the 'refs/' prefix
on ref names, even though it is included the ref.Ref value returned by
GitHub. This resulted in ref values returned from some methods that
couldn't be passed to other methods. In reality, ref names passed to
these methods should normally include the prefix, but this change
supports either form for backwards compatibility.
Fixes#133
The input and response types for commit messages differ in the API.
While commit.Tree and commit.Parents are objects with fields when
returned by the GitHub API, the attributes are plain strings when
creating new commits.
See: https://developer.github.com/v3/git/commits/#create-a-commit
First draft, suggestions for improvements are welcome. The snippet
should serve as the idiomatic guide on how to get all pages for a given
resource (a common use case without an obvious solution, hence the docs
can be very helpful).
Includes additions to User, Organization, Repository, and Gist. Some
minor changes to existing fields based on changes in the v3 API (for
example, Gist.User became Gist.Owner). Most everything else is new
additions.
refs #103
This includes all of the methods mentioned in this blog post:
https://developer.github.com/changes/2014-03-18-paginating-method-changes/
as well as a handful of others I found. Sadly, this is a breaking
change for many of these methods because it changes the method
signature, but with yesterday's API change these methods are now broken
anyway. :(
So it appears GitHub already supports multiple types of subscriptions:
repositories and threads. I'm leaving the data type simply as
'Subscription', but am updating the method names to avoid confusion,
since they're both part of the ActivitiesService.