0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-11-21 22:10:39 +00: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,10 +298,14 @@ func commitHandler(cfg Config, git sv.Git, messageProcessor sv.MessageProcessor)
if err != nil {
return err
}
issue, err := promptIssueID(cfg.CommitMessage.IssueFooterConfig().Key, cfg.CommitMessage.Issue.Regex, branchIssue)
var issue string
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?")
if err != nil {