41 Commits
Author SHA1 Message Date
Glenn Lewis 94c9c9abbe chore: Update openapi_operations.yaml (#4588) 2026-09-22 20:38:23 -04:00
Oleksandr Redko 3f47638460 refactor: Fix parameters in method endpoints (#4300) 2026-06-17 07:19:34 -04:00
Glenn Lewis 40ed57ff66 chore: Update openapi_operations.yaml (#4228) 2026-05-14 18:05:58 -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
Glenn Lewis 27db7f9d23 chore: Update openapi_operations.yaml (#4041) 2026-02-25 20:15:08 -05:00
Glenn Lewis c65cb55bcf Update openapi_operations.yaml (#3895) 2025-12-29 10:43:53 -05:00
Glenn Lewis 578f42edb5 chore: Update openapi_operations.yaml (#3802) 2025-11-04 13:22:30 -05:00
Glenn Lewis ef319d5576 Update OpenAPI (#3574) 2025-05-10 09:46:23 -04:00
Glenn Lewis a03e88cdf4 Update openapi (#3526) 2025-03-20 11:33:13 -04:00
Glenn Lewis f9210c4672 Update OpenAPI (#3352) 2024-11-19 07:59:59 -05:00
Oleksandr Redko 1ffcddbd4e docs: Add dots at the end of sentences (#3325) 2024-10-11 12:08:23 -04:00
Glenn Lewis 02f31995d5 Update openapi_operations.yaml (#3322) 2024-10-10 09:35:11 -04:00
Hari Charan Korrapati 8c1032ac98 feat!: Update deprecated endpoints in github/action_variables.go (#3104)
Fixes: #3103.

BREAKING-CHANGE: The following endpoints now take `owner` and `repo` (string) names instead of an integer repo ID:

ActionsService.ListEnvVariables
ActionsService.GetEnvVariable
ActionsService.CreateEnvVariable
ActionsService.UpdateEnvVariable
ActionsService.DeleteEnvVariable
2024-03-28 14:33:35 -04:00
WillAbides 1e66201027 Update metadata (#3012) 2023-12-02 16:47:01 -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 7a7a7f0943 Update URLs (#2373)
Fixes: #2360.
2022-05-24 08:43:48 -04: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
Ryan Mast 2fe941a427 Add support for Code Scanning API (#1545) 2020-06-16 21:20:22 -04:00
Clark Bynum 419f07c399 Update and remove OAuth endpoints (#1461)
Fixes #1331.
2020-03-17 09:10:52 -04:00
kadern0 69231319df Change opt param to opts (#1417)
Fixes #1415.
2020-02-09 20:01:54 -05:00
Jordan Sussman 60432275bd update broken and old enterprise doc links (#1108) 2019-01-27 20:28:38 -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
Elliott Beach 24139d56e9 Rename UpdateAt to UpdatedAt; fix JSON tag in Deployment structs. (#709)
Authorization struct had a "updated_at" JSON key mapped to UpdateAt,
which was an oversight/typo. It has been renamed to UpdatedAt, like all
other similar fields.

Deployments and DeploymentStatus structs had incorrectly mapped their
UpdatedAt field to a non-existing "pushed_at" JSON key. That means
their values were never populated. This change fixes that.

Bump library version as this is a breaking change.

Helps #605.
2017-08-31 22:11:34 -04:00
Sam Minnée fc60e1f520 Add *ListOptions parameter to 7 methods that support pagination. (#635)
This is an unavoidable breaking API change. To update to new version
without changing behavior, you can provide nil value for *ListOptions.

Bump libraryVersion to 7.

This adds a *ListOptions parameter to 7 methods that support pagination,
but inadvertently omitted this parameter:

-	AuthorizationsService.ListGrants
-	GistsService.ListCommits
-	PullRequestsService.ListReviewers
-	PullRequestsService.ListReviews
-	PullRequestsService.ListReviewComments
-	RepositoriesService.ListPagesBuilds
-	UsersService.ListInvitations

This is needed to support pagination. Without this parameter, it’s not
possible to fetch anything other than the first page (of default size)
of results.

Add _withOptions tests for each of the methods, that ignore the result
but ensure that ?page=2 is added to the API requests.
2017-05-11 21:42:59 -04: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
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
Ronak Jain 5494398587 removed authorization preview header
Fixes #464.
Closes #465.

Change-Id: I9bde509ef6bf9382c48344e58d4a77da4b33e4a3
2016-11-03 09:29:28 -07:00
Juan Basso 331e3f6190 Fixing some lint issues
Closes #408
2016-07-29 10:55:37 -04:00
Hanno Hecker 07a1059646 add (AuthorizationsService) CreateImpersonation/DeleteImpersonation
Closes #342.
2016-07-06 10:28:24 -07:00
Matthew Dempsky 8808be6605 Avoid unnecessary FooService allocations
Fixes #389
Fixes #390
2016-06-29 07:21:34 -07:00
Billy Lynch 087a452730 add support for OAuth Grant Authorizations API
GitHub API docs: https://developer.github.com/v3/oauth_authorizations

Fixes #348.
Closes #388.

Change-Id: I795b1c0e10bde10a1bc9aaa4594af4c91e07962d
2016-06-27 15:48:54 -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
Glenn Lewis a6edb1171a add support for git signing API methods
Fixes #334.

Change-Id: I9b10ae5e7679f5196778d9eb3ded6168d7facfc3
2016-06-13 12:58:45 -07:00
Neil O'Toole 3f4539c62a Update AuthorizationsService
- add new Scope type with values for each of GitHub's current scopes
- add String method to Authorization types
- doc updates
2016-04-05 15:11:22 -07:00
sona-tar 68828ce43f Support OAuth Authrization API.
Fixes #119
Fixes #241
2016-04-05 15:11:00 -07:00