GetPullRequestDiff: add PullRequestDiffOptions param #542
Labels
No Label
has/backport
has/pull
in progress
invalid
kind/breaking
kind/bug
kind/build
kind/deployment
kind/docs
kind/enhancement
kind/feature
kind/lint
kind/proposal
kind/question
kind/refactor
kind/security
kind/testing
kind/translation
kind/ui
need/backport
priority/critical
priority/low
priority/maybe
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/go-sdk#542
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "noerw/go-sdk:add-binary-diff-opt"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
this is for the upstream change in https://github.com/go-gitea/gitea/pull/17158
But we may have more options in future?
@ -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) {
breaking changes must be documented in migration howto
GetPullRequestDiff: add includeBinary optionto GetPullRequestDiff: add PullRequestDiffOptios param@6543 @lunny please rereview :)
GetPullRequestDiff: add PullRequestDiffOptios paramto GetPullRequestDiff: add PullRequestDiffOptions param@ -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
since this is optional and upstream default is true - we should change it to
*bool
typeNo, upstream default is false.