File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 55 "io/ioutil"
66 "os"
77 "regexp"
8+ "strings"
89
910 "github.com/mritd/gitflow-toolkit/pkg/consts"
1011 "github.com/mritd/gitflow-toolkit/pkg/util"
@@ -38,7 +39,9 @@ func CheckCommitMessage(args []string) {
3839 case string (consts .CHORE ):
3940 case string (consts .PERF ):
4041 default :
41- checkFailed ()
42+ if ! strings .HasPrefix (string (b ), "Merge branch" ) {
43+ checkFailed ()
44+ }
4245 }
4346 }
4447}
Original file line number Diff line number Diff line change @@ -32,4 +32,4 @@ const CommitTpl = `{{ .Type }}({{ .Scope }}): {{ .Subject }}
3232{{ .Sob }}
3333`
3434
35- const CommitMessagePattern = `^(?:fixup!\s*)?(\w*)(\(([\w\$\.\*/-]*)\))?\: (.*)`
35+ const CommitMessagePattern = `^(?:fixup!\s*)?(\w*)(\(([\w\$\.\*/-]*)\))?\: (.*)|^Merge\ branch(.*) `
You can’t perform that action at this time.
0 commit comments