23 Commits
Author SHA1 Message Date
Oleksandr Redko 3f47638460 refactor: Fix parameters in method endpoints (#4300) 2026-06-17 07:19:34 -04:00
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
Oleksandr Redko bfa9c8f36f fix!: Change id from int64 to string in ActivityService.MarkThreadDone (#4056)
BREAKING CHANGE: `ActivityService.MarkThreadDone` accepts `string` `id` instead of `int64`.
2026-03-02 08:36:40 -05:00
Oleksandr Redko c8fd3f74bc fix: Address modernize.omitzero issues (#3972) 2026-02-06 15:45:23 -05:00
Daniel Cole 057ff1b1ae Add 'mark thread as done' functionality (#3265)
Fixes #3264.
2024-09-17 11:18:28 -04:00
WillAbides a54bc7da1d Use metadata to reconcile go-github with GitHub's OpenAPI descriptions (#2919) 2023-11-03 10:26:59 -04:00
Victory Osikwemhe cdecead485 Change all fields from time.Time to github.Timestamp (#2646) 2023-01-26 16:39:42 -05:00
Glenn Lewis 7a7a7f0943 Update URLs (#2373)
Fixes: #2360.
2022-05-24 08:43:48 -04:00
Matthieu MOREL 8bd2892015 Set up workflow for golangci (#2020) 2021-08-18 16:54:30 -07: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 259aa56b9e Create tool to update and validate GitHub v3 API URLs (#1477)
Fixes #1476.
2020-04-09 21:28:23 -04:00
kadern0 69231319df Change opt param to opts (#1417)
Fixes #1415.
2020-02-09 20:01:54 -05: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
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
Dmitri Shuralyov 6a121d01ab Fix Mark{,Repository}NotificationsRead methods.
Both of those endpoints use PUT method, which means they must send
the parameters as a JSON encoded body rather than query parameters.

Source: https://developer.github.com/v3/#parameters

Fixes #402.
Closes #403.

Change-Id: I444d1ce9ba881200282ff617454addc2e6eb4793
2016-07-18 17:15:26 -07:00
Glenn Lewis 4ea1b10b74 replace []Issue with []*Issue and for other large structs as well
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
2016-06-19 19:42:35 -07:00
Bryan Boreham c2beba44cf Add missing ListOptions to various structs
Make it possible for callers of IssuesService.ListMilestones() and
similar to step through pages of results.
2016-06-08 10:10:06 -07:00
erwinvaneyk c801b653c2 Added field to NotificationListOptions 2015-09-18 13:43:47 -07:00
Will Norris b2ef504436 add activity notifications methods 2014-04-11 14:37:14 -07:00