Skip to content

Commit 364d22f

Browse files
dougtwillnorris
authored andcommitted
StarredRepository.repository has been renamed to .repo.
1 parent f48ac69 commit 364d22f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

github/activity_star.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import "fmt"
1010
// StarredRepository is returned by ListStarred.
1111
type StarredRepository struct {
1212
StarredAt *Timestamp `json:"starred_at,omitempty"`
13-
Repository *Repository `json:"repository,omitempty"`
13+
Repository *Repository `json:"repo,omitempty"`
1414
}
1515

1616
// ListStargazers lists people who have starred the specified repo.

github/activity_star_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func TestActivityService_ListStarred_authenticatedUser(t *testing.T) {
4444
mux.HandleFunc("/user/starred", func(w http.ResponseWriter, r *http.Request) {
4545
testMethod(t, r, "GET")
4646
testHeader(t, r, "Accept", mediaTypeStarringPreview)
47-
fmt.Fprint(w, `[{"starred_at":"2002-02-10T15:30:00Z","repository":{"id":1}}]`)
47+
fmt.Fprint(w, `[{"starred_at":"2002-02-10T15:30:00Z","repo":{"id":1}}]`)
4848
})
4949

5050
repos, _, err := client.Activity.ListStarred("", nil)
@@ -70,7 +70,7 @@ func TestActivityService_ListStarred_specifiedUser(t *testing.T) {
7070
"direction": "asc",
7171
"page": "2",
7272
})
73-
fmt.Fprint(w, `[{"starred_at":"2002-02-10T15:30:00Z","repository":{"id":2}}]`)
73+
fmt.Fprint(w, `[{"starred_at":"2002-02-10T15:30:00Z","repo":{"id":2}}]`)
7474
})
7575

7676
opt := &ActivityListStarredOptions{"created", "asc", ListOptions{Page: 2}}

0 commit comments

Comments
 (0)