Skip to content
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

Commit 91b57a1

Browse files
committed
pass CreatePullRequestOption as it is
1 parent 34eba81 commit 91b57a1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

gitea/pull.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,9 @@ type CreatePullRequestOption struct {
9595

9696
// CreatePullRequest create pull request with options
9797
func (c *Client) CreatePullRequest(owner, repo string, opt CreatePullRequestOption) (*PullRequest, error) {
98-
body, err := json.Marshal(&opt)
99-
if err != nil {
100-
return nil, err
101-
}
10298
pr := new(PullRequest)
10399
return pr, c.getParsedResponse("POST", fmt.Sprintf("/repos/%s/%s/pulls", owner, repo),
104-
jsonHeader, bytes.NewReader(body), pr)
100+
jsonHeader, opt, pr)
105101
}
106102

107103
// EditPullRequestOption options when modify pull request

0 commit comments

Comments
 (0)