72 Commits
Author SHA1 Message Date
Oleksandr Redko 3f47638460 refactor: Fix parameters in method endpoints (#4300) 2026-06-17 07:19:34 -04:00
Jam Balaya 3ad466541d feat: Add deploy_keys_enabled_for_repositories and secret scanning custom link fields to Organization struct (#4188) 2026-05-02 20:27:28 -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
Michael f12c950542 feat: Add ArchivedAt field to Organization struct (#4179) 2026-04-24 11:30:50 -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 c5bf1bc01d fix!: Add field PerPage to OrganizationsListOptions (#3986)
BREAKING CHANGE: `OrganizationsListOptions` now contains only `PerPage` instead of `ListOptions`.
2026-02-10 14:21:22 -05:00
Oleksandr Redko d14f4f3d8d docs: Improve displaying GitHub API links on pkg.go.dev (#3845) 2025-12-01 14:55:37 -05:00
Oleksandr Redko 025030e2dc Return back preview headers for search; remove TODOs for custom headers (#3824) 2025-11-13 07:29:48 -05:00
Glenn Lewis 036aeb428b Add custom jsonfieldname linter to ensure Go field name matches JSON tag name (#3757) 2025-10-17 15:53:56 -04:00
Glenn Lewis 4505771989 Prefer %v over %d,%s and add fmtpercentv custom linter (#3756) 2025-10-05 21:39:53 -04:00
Dani Meyer 74b2ca0c80 Add additional settings fields to org API (#3642) 2025-07-23 22:31:47 -04:00
Tomasz Adam Skrzypczak c4ec3276de Add scanning validity checks (#3026)
Fixes: #3006.
2023-12-14 09:14:41 -05: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 7b27977c44 Change PrivateRepos from int to int64 (#2738)
Fixes: #2736.
2023-04-05 13:10:17 -04:00
T.J. Corrigan 388d921556 Add support for deleting an org (#2728)
Fixes: #2726.
2023-03-31 09:41:01 -04:00
Victory Osikwemhe cdecead485 Change all fields from time.Time to github.Timestamp (#2646) 2023-01-26 16:39:42 -05:00
Brett Kuhlman 642c34392d Add org struct fields (#2471)
Fixes: #2470
2022-09-17 23:06:47 -04:00
Takashi Yoneuchi 8309da1144 Add MembersCanForkPrivateRepositories field to Organization struct (#2389) 2022-06-20 06:54:32 -04:00
Glenn Lewis 7a7a7f0943 Update URLs (#2373)
Fixes: #2360.
2022-05-24 08:43:48 -04:00
Marcelo Carlos ed10c13634 Add MembersCanCreate* to Organization (#1805) 2021-02-17 21:36:39 -05:00
Glenn Lewis a64f3a6d08 Update URLs (#1659) 2020-12-02 10:39:08 -05:00
Vikky Omkar 8e1859fece Remove graduated GitHub v3 API preview headers (#1618)
Fixes: #1616.
2020-09-17 11:18:51 -04: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
Ryan Mast 2c8de65144 Add missing fields to user and org types (#1548) 2020-05-31 16:04: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
Rajat Jindal fd8be9c18e Support new fields in Organization struct (#1347)
Fixes #1346.
2019-12-09 09:18:53 -05:00
Will Norris 7930f87c56 add missing fields for per-seat payment plans 2019-11-07 11:12:28 -08:00
Will Norris c020c3ffe3 fix golint warnings
- update docs to match exported func names
- no need to export func in example code
2019-11-04 09:50:18 +00:00
SriVignessh Pss 2a36cb4db3 Support List GitHub App installations for organization (#1320) 2019-10-25 16:34:45 -07:00
David 1bab17eebd Add repository creation permissions field (#1213) 2019-07-08 18:27:19 -04:00
Javier Campanini 71b7a374a5 Add other missing org field (#1019) 2018-09-28 13:38:21 -04:00
Javier Campanini 12fb185f1e Add missing org fields (#996) 2018-09-27 23:30:05 -04:00
eperm dc5aac8f03 Add TwoFactorRequirementEnabled to Organization (#1006)
Fixes #1004.
2018-09-15 17:08:23 -04:00
Shagun Khemka 29a3681d05 Remove custom media type for global node IDs (#925)
Fixes #919.
2018-08-10 11:23:19 -04:00
Parker Moore 4430a04b20 Add NodeID to a few structs (#970)
Helps #814.
2018-08-09 21:19:12 -04:00
Sandeep Sukhani eafdb65781 Documentation update for 'OrganizationsListOptions' and 'UserListOptions' (#903)
Fixes #900.
2018-05-03 20:51:46 -04:00
Qinfeng Chen ab468aa138 Change Since from int to int64 in OrganizationsListOptions. (#899)
Field Since in OrganizationsListOptions refers to an organization ID,
so its type needs to be int64 to per prior decision in #597.
This is already the case in other similar structs such as
RepositoryListAllOptions and UserListOptions.

This is a breaking API change that is a part of resolving issue #597.
It should've been applied earlier, but we missed it (likely because
the field doesn't have "ID" in its name, so it's harder to spot).

Updates #597.
2018-04-24 16:35:07 -04: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
Anubha Kushwaha cbeb72eaf5 Support preview GraphQL API v4 Node IDs. (#817)
Add NodeID field to objects that now expose it.

Reference: https://developer.github.com/changes/2017-12-19-graphql-node-id/.
2018-01-09 16:35:34 -05:00
Sebastian Mæland Pedersen 4c4aea2b66 Add OrganizationService.GetByID method. (#662)
Note: OrganizationService.GetByID uses the undocumented GitHub API
endpoint /organizations/:id.

Change all GetByID tests to fail early with t.Fatalf when error is returned.

Updates #329.
Follows #332 and #333.
2017-07-01 02:19:50 -04: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
Dmitri Shuralyov 493b233dca Use single space after period. (#549)
This commit was largely generated by:

	perl -i -npe 's,^(\s*// .+[a-z]\.)  +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.)  +([A-Z])')

With additional manual followups to catch the few remaining missed
cases, such as inside non-go files, spaces after question marks, etc.

Fixes #548.
2017-02-15 16:14:26 -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
Juan Basso 56add9d407 Add some missing fields
Refs #103
Closes #411.

Change-Id: Ia61f48de052fd61a98357ba6182ead613b454fa3
2016-08-02 11:08:27 -07:00
Matthew Dempsky 8808be6605 Avoid unnecessary FooService allocations
Fixes #389
Fixes #390
2016-06-29 07:21:34 -07:00