From 364d22ff1ddc86b97b08d806d2abfb34ccb4b22b Mon Sep 17 00:00:00 2001 From: Doug Turner Date: Fri, 5 Jun 2015 08:30:00 -0700 Subject: [PATCH] StarredRepository.repository has been renamed to .repo. --- github/activity_star.go | 2 +- github/activity_star_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/github/activity_star.go b/github/activity_star.go index 4ac4861..fac4f41 100644 --- a/github/activity_star.go +++ b/github/activity_star.go @@ -10,7 +10,7 @@ import "fmt" // StarredRepository is returned by ListStarred. type StarredRepository struct { StarredAt *Timestamp `json:"starred_at,omitempty"` - Repository *Repository `json:"repository,omitempty"` + Repository *Repository `json:"repo,omitempty"` } // ListStargazers lists people who have starred the specified repo. diff --git a/github/activity_star_test.go b/github/activity_star_test.go index e074e09..eb2c405 100644 --- a/github/activity_star_test.go +++ b/github/activity_star_test.go @@ -44,7 +44,7 @@ func TestActivityService_ListStarred_authenticatedUser(t *testing.T) { mux.HandleFunc("/user/starred", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "GET") testHeader(t, r, "Accept", mediaTypeStarringPreview) - fmt.Fprint(w, `[{"starred_at":"2002-02-10T15:30:00Z","repository":{"id":1}}]`) + fmt.Fprint(w, `[{"starred_at":"2002-02-10T15:30:00Z","repo":{"id":1}}]`) }) repos, _, err := client.Activity.ListStarred("", nil) @@ -70,7 +70,7 @@ func TestActivityService_ListStarred_specifiedUser(t *testing.T) { "direction": "asc", "page": "2", }) - fmt.Fprint(w, `[{"starred_at":"2002-02-10T15:30:00Z","repository":{"id":2}}]`) + fmt.Fprint(w, `[{"starred_at":"2002-02-10T15:30:00Z","repo":{"id":2}}]`) }) opt := &ActivityListStarredOptions{"created", "asc", ListOptions{Page: 2}}