24 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 531d1cfb59 test: Fix test names and error messages (#4284) 2026-06-05 11:02:34 -04:00
Oleksandr Redko 3215e0320e test: Remove redundant Marshal tests (#4266) 2026-06-04 09:22:07 -04:00
Dhananjay Mishra 0a16e22eba refactor: Use testJSONBody helper for request body assertions in tests (#4183) 2026-05-01 08:13:24 -04:00
Dhananjay Mishra d1dd1a50d8 chore: Use example.com instead of random URLs in tests (#3948) 2026-02-01 11:59:26 -05:00
Oleksandr Redko 233fe03e17 test: Use t.Context() instead of context.Background() (#3750) 2025-10-03 08:09:47 -04:00
Oleksandr Redko 9493278195 refactor: fix revive.unused-parameter lint issues (#3603) 2025-06-25 11:44:09 -04: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
WillAbides fd33b81221 Fix linting (#2903) 2023-09-08 08:55:37 -04:00
Victory Osikwemhe cdecead485 Change all fields from time.Time to github.Timestamp (#2646) 2023-01-26 16:39:42 -05:00
Santosh Kavhar 522514df01 Add test cases for JSON resource marshaling (#2173) 2021-10-29 12:47:20 -04:00
alihasan070707 13d3af517c Add test cases for JSON resource marshaling (#2150) 2021-10-27 11:44:20 -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 cb3d7b92be Improve users_gpg_keys.go coverage (#1727) 2020-12-25 19:21:55 -05:00
Glenn Lewis 460db534b8 Refactor context.Background in tests (#1672) 2020-12-16 05:58:28 -05:00
Palash Nigam c40b4abe46 GitHub Signing API: Remove custom media type (#1067)
Fixes #761.
2018-12-12 20:21:07 -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
Thordur Bjornsson d683a1c619 User: Modify ListGPGKeys to take a user argument. (#565)
If the user argument is the empty string, return the GPG keys for
the authenticated user, else for the user specified.

Lifted from github.UsersService.ListKeys.
2017-03-21 09:33:37 -07: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 a6edb1171a add support for git signing API methods
Fixes #334.

Change-Id: I9b10ae5e7679f5196778d9eb3ded6168d7facfc3
2016-06-13 12:58:45 -07:00