Add tea pr merge #348

Merged
zeripath merged 3 commits from noerw/tea:add-merge into master 2021-03-17 19:56:05 +00:00
Showing only changes of commit 7db6f2ac32 - Show all commits

View File

@ -27,6 +27,17 @@ var CmdPullsMerge = cli.Command{
Name: "style",
Aliases: []string{"s"},
Usage: "Kind of merge to perform: merge, rebase, squash, rebase-merge",
6543 marked this conversation as resolved
Review

for squash merge, we need flags for "Title" and "Message" options

for squash merge, we need flags for "Title" and "Message" options
Review

Default: "merge",

Default: "merge",
Value: "merge",
},
&cli.StringFlag{
Name: "title",
Aliases: []string{"t"},
Usage: "Merge commit title",
},
&cli.StringFlag{
Name: "message",
Aliases: []string{"m"},
Usage: "Merge commit message",
},
}, flags.AllDefaultFlags...),
Action: func(cmd *cli.Context) error {
@ -43,7 +54,9 @@ var CmdPullsMerge = cli.Command{
}
success, _, err := ctx.Login.Client().MergePullRequest(ctx.Owner, ctx.Repo, idx, gitea.MergePullRequestOption{
Style: gitea.MergeStyle(ctx.String("style")),
Style: gitea.MergeStyle(ctx.String("style")),
Title: ctx.String("title"),
Message: ctx.String("message"),
})
if err != nil {