mh-cbon / gh-api-cli

Command line client for github api
http://mh-cbon.github.io/gh-api-cli/
MIT License
4 stars 2 forks source link

Build error related to diff between User and CommitAuthor #2

Closed lanzafame closed 7 years ago

lanzafame commented 8 years ago

CommitAuthor cannot be used in place of github.User for github.RepositoryRelease.

I am unsure whether the way that I handled returning the Response object if there is an error is ideal but thought is better to give as much information as possible in the event of one.

mh-cbon commented 8 years ago

hi!

thanks for the report, i agree this should be fixed.


I am unsure whether the way that I handled returning the Response object if there is an error is ideal but thought is better to give as much information as possible in the event of one.

totally agree with you, the error management needs improvement.

TBD.


I think the problem comes from the glide install command. Clearly it did not download the right version of google/go-github, and the faulty commit is https://github.com/google/go-github/commit/a1746f282059a5d71c4d8a270753698e164151e5

Now, the current change has a small regression in it. It is not possible anymore to specify an alternate author name/email. See the corresponding command line here

The list of todos, imo, for future progress of this change,

Func signature should be updated to CreateRelease(client *github.Client, owner string, repo string, version string, ghAuthorUsername string, draft bool, body string)

User information fetch to update to user, resp, err := client.Users.Get(ghAuthorUsername)

The cli command should also be updated here,

Cli handler for create-release to update too, here

That's it, last note, the change requires a major bump.

Thanks again for the report!

mh-cbon commented 7 years ago

solved in 4.0.0