Improve logged messages
1. Quote commit message. 2. Log OK commits too. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
4d4511c407
commit
7616539e89
1 changed files with 5 additions and 2 deletions
7
main.go
7
main.go
|
@ -46,6 +46,8 @@ func main() {
|
|||
lca = getMergeBase(r, head, from)
|
||||
}
|
||||
|
||||
log.Printf("Resolved: %s", lca.Hash)
|
||||
|
||||
// Processing result.
|
||||
var fail bool
|
||||
|
||||
|
@ -70,17 +72,18 @@ func main() {
|
|||
header := lines[0]
|
||||
if !rxHeader.MatchString(header) {
|
||||
fail = true
|
||||
fmt.Printf("Error: invalid header %s [%s]\n", header, id)
|
||||
fmt.Printf("Error: invalid header '%s' [%s]\n", header, id)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Check commit sign-off.
|
||||
if !rxSignOff.MatchString(lines[len(lines)-1]) {
|
||||
fail = true
|
||||
fmt.Printf("Error: missing sign-off %s [%s]\n", header, id)
|
||||
fmt.Printf("Error: missing sign-off '%s' [%s]\n", header, id)
|
||||
return nil
|
||||
}
|
||||
|
||||
fmt.Printf("OK: '%s' [%s]\n", header, id)
|
||||
return nil
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue