Field Since in OrganizationsListOptions refers to an organization ID,
so its type needs to be int64 to per prior decision in #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 #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 #597.
Note: OrganizationService.GetByID uses the undocumented GitHub API
endpoint /organizations/:id.
Change all GetByID tests to fail early with t.Fatalf when error is returned.
Updates #329.
Follows #332 and #333.
This is a large breaking API change. It is unavoidable and necessary
to resolve#526. This breaking change is part of bump to libraryVersion 3.
It adds ctx context.Context as first parameter to all endpoint methods,
including Do.
Updating for this API change should be easy and the compiler will help
catch instances that need to be updated. For example:
main.go:193: not enough arguments in call to gh.Activity.MarkRepositoryNotificationsRead
have (string, string, time.Time)
want (context.Context, string, string, time.Time)
...
You should pass the available context as first parameter. If your code
does not have context.Context available and you want to maintain previous
normal behavior, use context.Background(). Don't pass nil context; use
context.TODO() instead if you wish to delay figuring out the best context
to use. Then you can address the TODO at a later time.
Refer to documentation of package context at https://godoc.org/context
for more information.
This commit also changes ./tests/fields to use context.Background()
instead of deprecated oauth2.NoContext.
Resolves#526.
This commit was largely generated by:
perl -i -npe 's,^(\s*// .+[a-z]\.) +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.) +([A-Z])')
With additional manual followups to catch the few remaining missed
cases, such as inside non-go files, spaces after question marks, etc.
Fixes#548.
This change is a proposal and is open for discussion.
Also fixed a couple locations that were returning nil
instead of returning the valid err.
Change-Id: I62da2980c76d6220ce2ef12e6a1e64b60769ab01