Fixes: #3103.
BREAKING-CHANGE: The following endpoints now take `owner` and `repo` (string) names instead of an integer repo ID:
ActionsService.ListEnvVariables
ActionsService.GetEnvVariable
ActionsService.CreateEnvVariable
ActionsService.UpdateEnvVariable
ActionsService.DeleteEnvVariable
Authorization struct had a "updated_at" JSON key mapped to UpdateAt,
which was an oversight/typo. It has been renamed to UpdatedAt, like all
other similar fields.
Deployments and DeploymentStatus structs had incorrectly mapped their
UpdatedAt field to a non-existing "pushed_at" JSON key. That means
their values were never populated. This change fixes that.
Bump library version as this is a breaking change.
Helps #605.
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.
There were various slight variations in the phrasing of comments with
the form:
// GitHub API docs: https://developer.github.com/v3/...
This change makes them all consistent.
Also fix "GitHub" misspelled as "Github" in a few places.
Followup to #551.
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
Note that this is an API-breaking change but should have minimal
impact on users of this package due to the nice inference
properties of the Go programming language.
Bumped `libraryVersion` to `2` due to API-breaking change as
discussed in #376.
Fixes#180.
Change-Id: Ib386135e6b8f306d1f54278968c576f3ceccc4e7