0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-09-20 00:02:46 +02:00

fix(commit): do not ask for issue if issue key is empty

issue: #13
This commit is contained in:
Beatriz Vieira 2021-03-11 23:10:46 -03:00
parent 4b15622117
commit 935e3fa8d0

View File

@ -298,9 +298,13 @@ func commitHandler(cfg Config, git sv.Git, messageProcessor sv.MessageProcessor)
if err != nil { if err != nil {
return err return err
} }
issue, err := promptIssueID(cfg.CommitMessage.IssueFooterConfig().Key, cfg.CommitMessage.Issue.Regex, branchIssue)
if err != nil { var issue string
return err if cfg.CommitMessage.IssueFooterConfig().Key != "" && cfg.CommitMessage.Issue.Regex != "" {
issue, err = promptIssueID(cfg.CommitMessage.IssueFooterConfig().Key, cfg.CommitMessage.Issue.Regex, branchIssue)
if err != nil {
return err
}
} }
hasBreakingChanges, err := promptConfirm("has breaking changes?") hasBreakingChanges, err := promptConfirm("has breaking changes?")