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
1 changed files with 6 additions and 3 deletions

View File

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