Added missing fields to MergePullRequestOption (#554)

Adds `MergeCommitID`, `delete_branch_after_merge` and `force_merge` missing fields according to [Gitea Swagger docummentation](https://try.gitea.io/api/swagger#/repository/repoMergePullRequest).

Co-authored-by: Hilário Coelho <hilario.coelho@securityside.com>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/554
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: spawn2kill <spawn2kill@noreply.gitea.io>
Co-committed-by: spawn2kill <spawn2kill@noreply.gitea.io>
This commit is contained in:
spawn2kill 2021-11-12 20:57:44 +08:00 committed by Lunny Xiao
parent 0fb32ac11f
commit 5d54a04f8d

View file

@ -210,8 +210,11 @@ func (c *Client) EditPullRequest(owner, repo string, index int64, opt EditPullRe
// MergePullRequestOption options when merging a pull request // MergePullRequestOption options when merging a pull request
type MergePullRequestOption struct { type MergePullRequestOption struct {
Style MergeStyle `json:"Do"` Style MergeStyle `json:"Do"`
MergeCommitID string `json:"MergeCommitID"`
Title string `json:"MergeTitleField"` Title string `json:"MergeTitleField"`
Message string `json:"MergeMessageField"` Message string `json:"MergeMessageField"`
DeleteBranchAfterMerge bool `json:"delete_branch_after_merge"`
ForceMerge bool `json:"force_merge"`
} }
// Validate the MergePullRequestOption struct // Validate the MergePullRequestOption struct