diff --git a/Makefile b/Makefile
index b618aed..91eeccc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
NAME := lab
-VERSION := v0.6.2
+VERSION := v0.6.3
REVISION := $(shell git rev-parse --short HEAD)
GOVERSION := $(go version)
diff --git a/commands/mr/create.go b/commands/mr/create.go
index 96dcc78..2d8efe9 100644
--- a/commands/mr/create.go
+++ b/commands/mr/create.go
@@ -122,6 +122,12 @@ func makeCreateMergeRequestOption(opt *CreateUpdateOption, title, description, b
if opt.MilestoneID != 0 {
createMergeRequestOption.MilestoneID = gitlab.Int(opt.MilestoneID)
}
+
+ _, removeSourceBranchFlag := opt.RemoveSourceBranchFlag()
+ createMergeRequestOption.RemoveSourceBranch = gitlab.Bool(removeSourceBranchFlag)
+ _, squashFlag := opt.SquashFlag()
+ createMergeRequestOption.Squash = gitlab.Bool(squashFlag)
+
return createMergeRequestOption
}
diff --git a/commands/mr/flag.go b/commands/mr/flag.go
index 3ce2900..3f33898 100644
--- a/commands/mr/flag.go
+++ b/commands/mr/flag.go
@@ -1,6 +1,8 @@
package mr
import (
+ "fmt"
+
flags "github.com/jessevdk/go-flags"
"github.com/lighttiger2505/lab/commands/internal"
"github.com/lighttiger2505/lab/internal/config"
@@ -15,15 +17,17 @@ type Option struct {
}
type CreateUpdateOption struct {
- Edit bool `short:"e" long:"edit" description:"Edit the merge request on editor. Start the editor with the contents in the given title and message options."`
- Title string `short:"i" long:"title" value-name:"
" description:"The title of an merge request"`
- Message string `short:"m" long:"message" value-name:"" description:"The message of an merge request"`
- Template string `short:"p" long:"template" value-name:"" description:"Start the editor with file using merge request template"`
- SourceBranch string `long:"source" value-name:"