GetPullRequestDiff: add PullRequestDiffOptions param #542

Merged
6543 merged 9 commits from noerw/go-sdk:add-binary-diff-opt into master 2022-01-13 17:30:39 +00:00
Member

this is for the upstream change in https://github.com/go-gitea/gitea/pull/17158

this is for the upstream change in https://github.com/go-gitea/gitea/pull/17158
noerw added this to the v0.16.0 milestone 2021-09-28 08:48:07 +00:00
noerw added the
kind/breaking
kind/enhancement
labels 2021-09-28 08:48:07 +00:00
noerw added 1 commit 2021-09-28 08:48:08 +00:00
GetPullRequestDiff: expose binary param
added in https://github.com/go-gitea/gitea/pull/17158
Some checks failed
continuous-integration/drone/pr Build is failing
196bca538a
noerw added 1 commit 2021-09-28 15:44:49 +00:00
update tests
All checks were successful
continuous-integration/drone/pr Build is passing
6c96bb4218
Owner

But we may have more options in future?

But we may have more options in future?
noerw added 1 commit 2021-10-12 06:55:23 +00:00
Merge branch 'master' into add-binary-diff-opt
All checks were successful
continuous-integration/drone/pr Build is passing
c8f8179c85
6543 reviewed 2022-01-04 17:11:34 +00:00
gitea/pull.go Outdated
@ -284,2 +283,2 @@
func (c *Client) GetPullRequestDiff(owner, repo string, index int64) ([]byte, *Response, error) {
return c.getPullRequestDiffOrPatch(owner, repo, "diff", index)
// GetPullRequestDiff gets the diff of a PR. For Gitea >= 1.16, you must set includeBinary to get an applicable diff
func (c *Client) GetPullRequestDiff(owner, repo string, index int64, includeBinary bool) ([]byte, *Response, error) {
Owner

breaking changes must be documented in migration howto

breaking changes must be documented in migration howto
noerw marked this conversation as resolved
noerw added 1 commit 2022-01-11 10:47:27 +00:00
Merge branch 'master' into add-binary-diff-opt
All checks were successful
continuous-integration/drone/pr Build is passing
9b8b3cf4d4
noerw added 3 commits 2022-01-11 11:16:29 +00:00
noerw added 1 commit 2022-01-11 11:19:29 +00:00
update test
Some checks failed
continuous-integration/drone/pr Build is failing
904ee976e3
noerw changed title from GetPullRequestDiff: add includeBinary option to GetPullRequestDiff: add PullRequestDiffOptios param 2022-01-11 11:22:32 +00:00
Author
Member

@6543 @lunny please rereview :)

@6543 @lunny please rereview :)
noerw added 1 commit 2022-01-11 11:24:46 +00:00
lint
All checks were successful
continuous-integration/drone/pr Build is passing
1653c52cb6
noerw changed title from GetPullRequestDiff: add PullRequestDiffOptios param to GetPullRequestDiff: add PullRequestDiffOptions param 2022-01-11 11:31:23 +00:00
6543 reviewed 2022-01-11 23:49:18 +00:00
@ -267,0 +267,4 @@
// PullRequestDiffOptions options for GET /repos/<owner>/<repo>/pulls/<idx>.[diff|patch]
type PullRequestDiffOptions struct {
// Include binary file changes when requesting a .diff
Binary bool
Owner

since this is optional and upstream default is true - we should change it to *bool type

since this is optional and upstream default is true - we should change it to `*bool` type
Author
Member

No, upstream default is false.

No, upstream default is false.
6543 marked this conversation as resolved
lunny approved these changes 2022-01-13 06:25:19 +00:00
6543 approved these changes 2022-01-13 17:30:31 +00:00
6543 merged commit 3ff2c60a86 into master 2022-01-13 17:30:39 +00:00
noerw deleted branch add-binary-diff-opt 2022-01-14 10:42:19 +00:00
Sign in to join this conversation.
No description provided.