Update go-github library

This commit is contained in:
Luke Kysow
2018-12-12 09:55:17 -06:00
parent e001353ae9
commit 139f05ab49
170 changed files with 14305 additions and 3086 deletions

View File

@@ -54,19 +54,19 @@ func TestStringify(t *testing.T) {
// actual GitHub structs
{
Timestamp{time.Date(2006, 01, 02, 15, 04, 05, 0, time.UTC)},
Timestamp{time.Date(2006, time.January, 02, 15, 04, 05, 0, time.UTC)},
`github.Timestamp{2006-01-02 15:04:05 +0000 UTC}`,
},
{
&Timestamp{time.Date(2006, 01, 02, 15, 04, 05, 0, time.UTC)},
&Timestamp{time.Date(2006, time.January, 02, 15, 04, 05, 0, time.UTC)},
`github.Timestamp{2006-01-02 15:04:05 +0000 UTC}`,
},
{
User{ID: Int(123), Name: String("n")},
User{ID: Int64(123), Name: String("n")},
`github.User{ID:123, Name:"n"}`,
},
{
Repository{Owner: &User{ID: Int(123)}},
Repository{Owner: &User{ID: Int64(123)}},
`github.Repository{Owner:github.User{ID:123}}`,
},
}
@@ -96,37 +96,37 @@ func TestString(t *testing.T) {
{CommitsComparison{TotalCommits: Int(1)}, `github.CommitsComparison{TotalCommits:1}`},
{Commit{SHA: String("s")}, `github.Commit{SHA:"s"}`},
{Event{ID: String("1")}, `github.Event{ID:"1"}`},
{GistComment{ID: Int(1)}, `github.GistComment{ID:1}`},
{GistComment{ID: Int64(1)}, `github.GistComment{ID:1}`},
{GistFile{Size: Int(1)}, `github.GistFile{Size:1}`},
{Gist{ID: String("1")}, `github.Gist{ID:"1", Files:map[]}`},
{GitObject{SHA: String("s")}, `github.GitObject{SHA:"s"}`},
{Gitignore{Name: String("n")}, `github.Gitignore{Name:"n"}`},
{Hook{ID: Int(1)}, `github.Hook{Config:map[], ID:1}`},
{IssueComment{ID: Int(1)}, `github.IssueComment{ID:1}`},
{Hook{ID: Int64(1)}, `github.Hook{ID:1, Config:map[]}`},
{IssueComment{ID: Int64(1)}, `github.IssueComment{ID:1}`},
{Issue{Number: Int(1)}, `github.Issue{Number:1}`},
{Key{ID: Int(1)}, `github.Key{ID:1}`},
{Label{ID: Int(1), Name: String("l")}, `github.Label{ID:1, Name:"l"}`},
{Organization{ID: Int(1)}, `github.Organization{ID:1}`},
{PullRequestComment{ID: Int(1)}, `github.PullRequestComment{ID:1}`},
{Key{ID: Int64(1)}, `github.Key{ID:1}`},
{Label{ID: Int64(1), Name: String("l")}, `github.Label{ID:1, Name:"l"}`},
{Organization{ID: Int64(1)}, `github.Organization{ID:1}`},
{PullRequestComment{ID: Int64(1)}, `github.PullRequestComment{ID:1}`},
{PullRequest{Number: Int(1)}, `github.PullRequest{Number:1}`},
{PullRequestReview{ID: Int(1)}, `github.PullRequestReview{ID:1}`},
{PullRequestReview{ID: Int64(1)}, `github.PullRequestReview{ID:1}`},
{DraftReviewComment{Position: Int(1)}, `github.DraftReviewComment{Position:1}`},
{PullRequestReviewRequest{Body: String("r")}, `github.PullRequestReviewRequest{Body:"r"}`},
{PullRequestReviewDismissalRequest{Message: String("r")}, `github.PullRequestReviewDismissalRequest{Message:"r"}`},
{PushEventCommit{SHA: String("s")}, `github.PushEventCommit{SHA:"s"}`},
{PushEvent{PushID: Int(1)}, `github.PushEvent{PushID:1}`},
{PushEvent{PushID: Int64(1)}, `github.PushEvent{PushID:1}`},
{Reference{Ref: String("r")}, `github.Reference{Ref:"r"}`},
{ReleaseAsset{ID: Int(1)}, `github.ReleaseAsset{ID:1}`},
{RepoStatus{ID: Int(1)}, `github.RepoStatus{ID:1}`},
{RepositoryComment{ID: Int(1)}, `github.RepositoryComment{ID:1}`},
{ReleaseAsset{ID: Int64(1)}, `github.ReleaseAsset{ID:1}`},
{RepoStatus{ID: Int64(1)}, `github.RepoStatus{ID:1}`},
{RepositoryComment{ID: Int64(1)}, `github.RepositoryComment{ID:1}`},
{RepositoryCommit{SHA: String("s")}, `github.RepositoryCommit{SHA:"s"}`},
{RepositoryContent{Name: String("n")}, `github.RepositoryContent{Name:"n"}`},
{RepositoryRelease{ID: Int(1)}, `github.RepositoryRelease{ID:1}`},
{Repository{ID: Int(1)}, `github.Repository{ID:1}`},
{Team{ID: Int(1)}, `github.Team{ID:1}`},
{RepositoryRelease{ID: Int64(1)}, `github.RepositoryRelease{ID:1}`},
{Repository{ID: Int64(1)}, `github.Repository{ID:1}`},
{Team{ID: Int64(1)}, `github.Team{ID:1}`},
{TreeEntry{SHA: String("s")}, `github.TreeEntry{SHA:"s"}`},
{Tree{SHA: String("s")}, `github.Tree{SHA:"s"}`},
{User{ID: Int(1)}, `github.User{ID:1}`},
{User{ID: Int64(1)}, `github.User{ID:1}`},
{WebHookAuthor{Name: String("n")}, `github.WebHookAuthor{Name:"n"}`},
{WebHookCommit{ID: String("1")}, `github.WebHookCommit{ID:"1"}`},
{WebHookPayload{Ref: String("r")}, `github.WebHookPayload{Ref:"r"}`},