17 Commits
Author SHA1 Message Date
Steve Hipwell 9fbf4bef19 feat!: Refactor request context (#4151)
BREAKING CHANGE: All internal calls now provide `Context` via the `Request` itself.
2026-04-24 14:45:31 -04:00
Oleksandr Redko 33cf038ac1 docs: Add apiVersion to GitHub API link (#4147) 2026-04-11 10:47:17 -04:00
Glenn Lewis a2063a76fb chore: Remove unnecessary use of new and &SomeStruct{} and add new extraneousnew custom linter (#4106) 2026-03-18 17:12:53 -04:00
WillAbides a54bc7da1d Use metadata to reconcile go-github with GitHub's OpenAPI descriptions (#2919) 2023-11-03 10:26:59 -04:00
Glenn Lewis 7a7a7f0943 Update URLs (#2373)
Fixes: #2360.
2022-05-24 08:43:48 -04:00
Glenn Lewis a64f3a6d08 Update URLs (#1659) 2020-12-02 10:39:08 -05:00
Glenn Lewis 159b448168 Switch to new GitHub v3 API Documentation website (#1621) 2020-09-01 18:30:47 -04:00
Glenn Lewis 0683ca03b4 Update URLs (#1558) 2020-06-24 19:27:03 -04:00
Glenn Lewis 8256b7258d Fix receivers and other breaking changes (#1487) 2020-04-09 21:21:44 -04:00
Dmitri Shuralyov b59d3a6479 Improve consistency of "GitHub API docs" strings in comments. (#562)
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.
2017-02-23 11:22:02 -05:00
Dmitri Shuralyov 23d6cb9cac Add support for context package to all endpoints. (#529)
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.
2017-02-20 16:05:42 -05:00
Kevin Burke 82629e0459 Use HTTPS for all developer.github.com links. (#551)
Avoids a redirect and possible tampering.
2017-02-17 20:59:02 -05:00
Nick Spragg 30a21ee1a3 Return nil error explicitly when there is no error. (#546)
Helps #536.
Follows #542.
2017-02-13 17:27:33 -05:00
Glenn Lewis f7b63ba4fc Change new([]*...) to slice zero value
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
2017-01-31 10:12:48 -08:00
Matthew Dempsky 8808be6605 Avoid unnecessary FooService allocations
Fixes #389
Fixes #390
2016-06-29 07:21:34 -07:00
Will Norris dcc1981fd9 fix golint and gofmt errors 2014-05-17 11:35:34 -10:00
Zach Latta 15e40efde8 Add Gitignore support. 2013-11-04 09:34:57 -08:00