23 Commits
Author SHA1 Message Date
Ajay Kemparaj f9fec07de4 feat: Require Go 1.26 and use new(expr) for pointer literals (#4481) 2026-08-28 12:18:49 -04:00
Oleksandr Redko 3215e0320e test: Remove redundant Marshal tests (#4266) 2026-06-04 09:22:07 -04:00
Oleksandr Redko 5158bb8e5f chore: Improve testJSONMarshal (#4042) 2026-02-27 07:27:18 -05:00
Oleksandr Redko 233fe03e17 test: Use t.Context() instead of context.Background() (#3750) 2025-10-03 08:09:47 -04:00
Glenn Lewis 550ecbe014 feat!: Remove Project (classic) support (#3380)
BREAKING CHANGE: All support for "Project (classic)" is removed and `Project` responses are replaced by `ProjectV2` (renamed from `ProjectsV2`).

Fixes: #3367.
2024-12-11 08:44:55 -05:00
Oleksandr Redko f66ed85955 feat: Deprecate and replace Bool,Int,Int64,String with Ptr using generics (#3355) 2024-12-10 21:36:09 -05:00
Glenn Lewis dc884c26ca Add t.Parallel to unit tests (#3297) 2024-10-05 07:29:05 -04:00
Glenn Lewis e56d378b96 refactor: Do not call teardown manually in tests (#3296) 2024-10-01 11:52:30 -04:00
Pj Meyer 5224e34400 Add support for "performed_via_github_app" and "requested_team" in IssueEvent (#2946)
Fixes: #2495.
2023-10-03 19:13:19 -04:00
Victory Osikwemhe cdecead485 Change all fields from time.Time to github.Timestamp (#2646) 2023-01-26 16:39:42 -05:00
Sagar Sonwane d9b68233a8 Add test cases for JSON resource marshaling (#1978) 2021-07-13 14:49:38 -04:00
Sagar Sonwane 51e7595f87 fix: Updated comparisons in test files (#1875)
Replaced all reflect.DeepEqual comparisons in test files with cmp.Equal.

Fixes: #1851
2021-05-26 11:49:24 -07:00
Glenn Lewis 2c9fa29dc3 Use new test helpers (#1684) 2020-12-24 22:14:57 -05:00
Glenn Lewis 3c6d85e049 Increase issues_events.go code coverage (#1666) 2020-12-17 21:41:27 -05:00
Glenn Lewis 460db534b8 Refactor context.Background in tests (#1672) 2020-12-16 05:58:28 -05:00
Vikky Omkar 8e1859fece Remove graduated GitHub v3 API preview headers (#1618)
Fixes: #1616.
2020-09-17 11:18:51 -04:00
Ryan Leung 5b3a7ee2a5 IssueTimeline: Support Project Card fields (#1092)
Fixes #1091.
2019-01-10 15:55:04 -05:00
Kshitij Saraogi e48060a28f Migrate IDs to int64 type (#816)
A helper function "Int64" is also implemented to assist the migration of
unit tests.

Refer #597.
2018-01-25 10:59:44 -08:00
Chris King df88dd9538 Remove global test variables in favor of local. (#766)
This refactor removes the global test variables used by all tests,
replacing them with local variables that are independent in each test.

This is better style, easier to read and be confident about correctness,
and allows tests to be parallelized in the future.

Resolves #762.
2017-12-02 14:34:41 -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
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
Glenn Lewis 3e167707c0 remove unnecessary newlines
Change-Id: I7bf843b42a0d8869e72b6d0606bdc99893b10bdb
2016-06-17 10:34:55 -07:00
Will Norris 57201fd197 add issue event methods 2014-04-11 15:41:11 -07:00