BREAKING CHANGE: `PullRequestReviewDismissalRequest` is now `PullRequestDismissReviewRequest` with non-pointer `Message` and `PullRequestsService.DismissReview` takes it by value; `PullRequestsService.SubmitReview` now takes a new `PullRequestSubmitReviewRequest`.
This is an unavoidable breaking API change. To update to new version
without changing behavior, you can provide nil value for *ListOptions.
Bump libraryVersion to 7.
This adds a *ListOptions parameter to 7 methods that support pagination,
but inadvertently omitted this parameter:
- AuthorizationsService.ListGrants
- GistsService.ListCommits
- PullRequestsService.ListReviewers
- PullRequestsService.ListReviews
- PullRequestsService.ListReviewComments
- RepositoriesService.ListPagesBuilds
- UsersService.ListInvitations
This is needed to support pagination. Without this parameter, it’s not
possible to fetch anything other than the first page (of default size)
of results.
Add _withOptions tests for each of the methods, that ignore the result
but ensure that ?page=2 is added to the API requests.
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.