31 Commits
Author SHA1 Message Date
Jam Balaya 4d45b7c496 refactor!: Rename PullRequestReviewDismissalRequest to PullRequestDismissReviewRequest, add PullRequestSubmitReviewRequest, and pass review request bodies by value (#4406)
BREAKING CHANGE: `PullRequestReviewDismissalRequest` is now `PullRequestDismissReviewRequest` with non-pointer `Message` and `PullRequestsService.DismissReview` takes it by value; `PullRequestsService.SubmitReview` now takes a new `PullRequestSubmitReviewRequest`.
2026-07-31 14:34:51 -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
Glenn Lewis 4505771989 Prefer %v over %d,%s and add fmtpercentv custom linter (#3756) 2025-10-05 21:39:53 -04:00
Roman Wu 2eec208059 Document upcoming changes to events payload (#3667) 2025-08-12 10:02:16 -04:00
Matt Simons 020ef00cd8 Revert "Add CommitID, InReplyTo, and SubjectType to DraftReviewComment" (#3218)
Fixes: #3219.
2024-07-25 14:47:30 -04:00
Matt Simons 06c9709215 Add CommitID, InReplyTo, and SubjectType to DraftReviewComment (#3169)
Fixes: #3168.
2024-05-14 11:04:21 -04:00
WillAbides a54bc7da1d Use metadata to reconcile go-github with GitHub's OpenAPI descriptions (#2919) 2023-11-03 10:26:59 -04:00
Victory Osikwemhe cdecead485 Change all fields from time.Time to github.Timestamp (#2646) 2023-01-26 16:39:42 -05:00
Glenn Lewis f6bffcf431 Bump version of go-github library to v46 (#2437) 2022-08-19 10:22:28 -04:00
Glenn Lewis 7a7a7f0943 Update URLs (#2373)
Fixes: #2360.
2022-05-24 08:43:48 -04:00
Glenn Lewis f6640949b0 Remove outdated comment for #540 (#2117) 2021-10-06 11:12:03 -04:00
Chris Mc 51f17753ba Remove outdated todo (#1824)
Relates to: #540.
2021-03-15 07:56:28 -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
Glenn Lewis 0683ca03b4 Update URLs (#1558) 2020-06-24 19:27:03 -04:00
Matt Moore 3d244d3d49 Add support for multi-line comments (#1566) 2020-06-24 19:19:06 -04:00
kadern0 69231319df Change opt param to opts (#1417)
Fixes #1415.
2020-02-09 20:01:54 -05:00
Qais Patankar 85084c0ce7 Add the AuthorAssociation field to PullRequestReview (#1413) 2020-02-08 18:41:23 -05:00
Joshua Bezaleel Abednego 0ab167c7d8 Add method for updating a pull request review (#1177)
Fixes: #1174.
2019-05-29 22:02:27 -04:00
Vaibhav Singh d5a4c11549 Support preview GraphQL API v4 Node IDs (#1149)
Fixes #814.
2019-04-09 17:31:59 -04:00
Michael Spiegel 2ae5df7848 Revert pull request number from int64 to int (#916) 2018-05-29 08:03:58 -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
haya14busa f6abac9979 Support commit_id for "Create a pull request review" (#683)
Support commit_id for "Create a pull request review"

https://developer.github.com/v3/pulls/reviews/#create-a-pull-request-review
2017-08-09 10:20:42 -07:00
avr2j 11516601ad Remove custom media type for Pull Request Reviews API. (#641)
The Pull Request Reviews API (include Review Requests) has become an
official part of GitHub API v3, so the preview API media type is no
longer needed. See announcement at
https://developer.github.com/changes/2017-05-09-end-black-cat-preview/.

Resolves #638.
2017-05-15 15:45:53 -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 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
Sahil Dua 27c7c32b6d Add support for new pull request review API
Fixes #495.
Closes #497.

Change-Id: If266972e7a20f83afaa842d54c22846bbb435328
2017-02-02 16:04:50 -08:00
Parker Moore 511bc5f4a8 Add support for PullRequestReviewEvent webhook.
Fixes #450.
Closes #451.

Change-Id: Iebdd2bd35a8ddd1346b2268e4e837d6145e990dc
2016-11-28 11:36:16 -08:00