Skip to content

Commit

Permalink
chore: improve error message when JIRA key is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
fallion committed Jun 18, 2020
1 parent 134984f commit 9125fce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/root_runner/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (runner *Runner) Run(options RunnerOptions, args ...string) error {
}

if len(references) == 0 {
return errors.New("no references found in Pull Request title")
return errors.New("No JIRA references found in Pull Request title")
}

successMessage := aurora.Sprintf(aurora.Green("Success! Found the following JIRA issue references: %v \n"), references)
Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"github.com/aevea/commitsar/config"
"github.com/aevea/commitsar/internal/version_runner"
"github.com/logrusorgru/aurora"

"github.com/aevea/commitsar/internal/root_runner"
"github.com/aevea/integrations"
Expand Down Expand Up @@ -130,7 +131,7 @@ func main() {
rootCmd.AddCommand(versionCmd)

if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
fmt.Println(aurora.Red(err))
os.Exit(1)
}
}

1 comment on commit 9125fce

@vercel
Copy link

@vercel vercel bot commented on 9125fce Jun 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.