19 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 233fe03e17 test: Use t.Context() instead of context.Background() (#3750) 2025-10-03 08:09:47 -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
Sagar Sonwane 5dfd991ebc Add test cases for JSON resource marshaling (#1961) 2021-07-13 13:10:22 -04:00
Fabian Holler 19e2a7bd55 feeds: define struct types instead of using anonymous structs 2021-07-08 10:48:24 +02: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 413a1dbafa Improve users_emails.go coverage (#1763) 2020-12-25 19:51:31 -05:00
Glenn Lewis e4b511744f Add pointers to structs in slices (#1443) 2020-02-28 09:37:37 -05:00
Christian Muehlhaeuser c756c329c1 Fix ineffectual assignments and error handling in tests (#1234) 2019-07-19 21:58:03 -04:00
Glenn Lewis cd2824bde7 Coverage: activity.go (#1201) 2019-06-20 22:02:21 -04: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 b86f6fcb28 Add support for Feeds API
Fixes #191.

Change-Id: I2fbcca9913cd20df75e9b5a5272a50879025d526
2016-03-23 23:38:37 -07:00
Billy Lynch 8ee61256c3 Restructured Activity Service and Event files. 2013-08-01 11:14:15 -04:00
rc1140 b347348d7a Added ListStarred and ListLanguages functions
Repository service:
    ListLanguages   : Allows a user to list the languages for a repository
Activity service:
    ListStarred     : Allows a user to list the starred repositories for a user
2013-07-29 14:13:40 -07:00