19 Commits
Author SHA1 Message Date
Glenn Lewis 5b37d46b98 fix!: Match request body fields to the OpenAPI schemas (#4581) 2026-09-23 11:23:20 -04:00
Oleksandr Redko 3f47638460 refactor: Fix parameters in method endpoints (#4300) 2026-06-17 07:19:34 -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
Rupok Ghosh db8be8bc7f refactor!: Change GitService methods to pass required params by-value instead of by-ref (#3654)
BREAKING CHANGE: `GitService` methods now pass required params by-value instead of by-ref.
2025-08-04 15:02:50 -04:00
Oleksandr Redko a81b973f77 refactor: Fix gocritic.paramTypeCombine lint issues (#3655) 2025-07-28 11:26:12 -04: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 3e8a7f0fbe Clean up method return consistency (#2318) 2022-03-24 23:16:22 -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
Shagun Khemka 29a3681d05 Remove custom media type for global node IDs (#925)
Fixes #919.
2018-08-10 11:23:19 -04:00
David Symonds 89a446efe8 Add GitService.GetBlobRaw method. (#891)
This method is similar to GitService.GetBlob, except it uses the
"application/vnd.github.v3.raw" media type to fetch the blob content
as raw bytes (rather than a JSON object containing a base64-encoded
string and other information).

GitHub API docs:

-	https://developer.github.com/v3/git/blobs/#get-a-blob
-	https://developer.github.com/v3/git/blobs/#custom-media-types

Fixes #658.
2018-04-11 00:51:06 -04: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
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
Björn Häuser 68d9199c29 Edit branch protection
This adds support and integration tests for editing branch protection.
2016-01-14 16:11:48 -08:00
ttacon eef7187591 Add get/create blobs 2014-04-07 14:25:55 -07:00