Skip to content

Commit

Permalink
fix 🐛: fixed issue with emoji not being added to the commit body
Browse files Browse the repository at this point in the history
  • Loading branch information
muandane committed Dec 12, 2023
1 parent 1b1690e commit 54d11a9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/utils/askQuestions.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func AskQuestions(config *config.Config) (string, error) {
commitTypeOptions := make([]huh.Option[string], len(config.Types))

for i, ct := range config.Types {
commitTypeOptions[i] = huh.NewOption[string](fmt.Sprintf("%-10s %-5s %-10s", ct.Name, ct.Emoji, ct.Description), ct.Name)
commitTypeOptions[i] = huh.NewOption[string](fmt.Sprintf("%-10s %-5s %-10s", ct.Name, ct.Emoji, ct.Description), fmt.Sprintf("%s %s", ct.Name, ct.Emoji))
}

promptType := huh.NewSelect[string]().
Expand All @@ -29,7 +29,7 @@ func AskQuestions(config *config.Config) (string, error) {
// Only ask for commitScope if not in SkipQuestions
if !isInSkipQuestions("Scopes", config.SkipQuestions) {
promptScope := huh.NewInput().
Title("Enter the scope of the change:").
Title("What is the scope of this change? (class or file name): (press [enter] to skip)").
Value(&commitScope)

err = promptScope.Run()
Expand All @@ -38,8 +38,9 @@ func AskQuestions(config *config.Config) (string, error) {
}
}

promptSubject := huh.NewInput().
Title("Enter a short description of the change:").
promptSubject := huh.NewText().
Title("Write a short and imperative summary of the code changes: (lower case and no period)").
CharLimit(100).
Value(&commitSubject)

err = promptSubject.Run()
Expand Down

0 comments on commit 54d11a9

Please sign in to comment.