@@ -38,9 +38,9 @@ func main() {
3838 os .Exit (1 )
3939 }
4040
41- fmt .Printf ("titleType : %s\n " , titleType )
42- fmt .Printf ("titleScope : %s\n " , titleScope )
43- fmt .Printf ("titleMessage : %s\n " , titleMessage )
41+ fmt .Printf ("commit title type used : %s\n " , titleType )
42+ fmt .Printf ("commit title scope used : %s\n " , titleScope )
43+ fmt .Printf ("commit title message used : %s\n " , titleMessage )
4444}
4545
4646func fetchTitle (githubEventPath string ) string {
@@ -84,6 +84,7 @@ func splitTitle(title string) (titleType string, titleScope string, titleMessage
8484 // this part of the function extracts the message
8585 if strings .Contains (title , ":" ) {
8686 titleMessage = strings .SplitAfter (title , ":" )[1 ]
87+ titleMessage = strings .TrimSpace (titleMessage )
8788 } else {
8889 fmt .Println ("No message was included in the pull request title." )
8990 fmt .Println (desiredFormat )
@@ -100,5 +101,5 @@ func checkAgainstConventionTypes(titleType string, conventionTypes []string) err
100101 }
101102 }
102103
103- return fmt .Errorf ("The type passed '%s' is not present in the types allowed by the convention: %s\n " , titleType , conventionTypes )
104+ return fmt .Errorf ("the type passed '%s' is not present in the types allowed by the convention: %s" , titleType , conventionTypes )
104105}
0 commit comments