You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8ed4662
Browse filesBrowse the repository at this point in the historyBrowse files
Add support for context package to all endpoints. (google#529)
This is a large breaking API change. It is unavoidable and necessary
to resolvegoogle#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.
Resolvesgoogle#526.
// ListEvents drinks from the firehose of all public events across GitHub.
98
99
//
99
100
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events
// ListRepositoryEvents lists events for a repository.
121
122
//
122
123
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-repository-events
// ListIssueEventsForRepository lists issue events for a repository.
145
146
//
146
147
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
// ListEventsForRepoNetwork lists public events for a network of repositories.
169
170
//
170
171
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories
// ListEventsForOrganization lists public events for an organization.
193
194
//
194
195
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events-for-an-organization
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-performed-by-a-user
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received
// must be authenticated as the user to view this.
278
279
//
279
280
// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-for-an-organization
0 commit comments