Skip to content

Commit fc6850d

Browse files
qinfchendmitshur
authored andcommitted
Change Since from int to int64 in OrganizationsListOptions. (google#899)
Field Since in OrganizationsListOptions refers to an organization ID, so its type needs to be int64 to per prior decision in google#597. This is already the case in other similar structs such as RepositoryListAllOptions and UserListOptions. This is a breaking API change that is a part of resolving issue google#597. It should've been applied earlier, but we missed it (likely because the field doesn't have "ID" in its name, so it's harder to spot). Updates google#597.
1 parent 63e0c82 commit fc6850d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

github/orgs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func (p Plan) String() string {
7575
// OrganizationsService.ListAll method.
7676
type OrganizationsListOptions struct {
7777
// Since filters Organizations by ID.
78-
Since int `url:"since,omitempty"`
78+
Since int64 `url:"since,omitempty"`
7979

8080
ListOptions
8181
}

github/orgs_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestOrganizationsService_ListAll(t *testing.T) {
1818
client, mux, _, teardown := setup()
1919
defer teardown()
2020

21-
since := 1342004
21+
since := int64(1342004)
2222
mux.HandleFunc("/organizations", func(w http.ResponseWriter, r *http.Request) {
2323
testMethod(t, r, "GET")
2424
testHeader(t, r, "Accept", mediaTypeGraphQLNodeIDPreview)

0 commit comments

Comments
 (0)