simplified regexp matching of skip ci instruction in commit message

This commit is contained in:
glaszig 2015-12-11 02:12:27 +01:00
parent 845d437256
commit cb01394977

View file

@ -43,9 +43,9 @@ func PostHook(c *gin.Context) {
// skip the build if any case-insensitive combination of the words "skip" and "ci" // skip the build if any case-insensitive combination of the words "skip" and "ci"
// wrapped in square brackets appear in the commit message // wrapped in square brackets appear in the commit message
skipMatches := skipRe.FindStringSubmatch(build.Message) skipMatch := skipRe.FindString(build.Message)
if len(skipMatches) > 0 { if len(skipMatch) > 0 {
log.Infof("ignoring hook. %s found in %s", skipMatches[0], build.Commit) log.Infof("ignoring hook. %s found in %s", skipMatch, build.Commit)
c.Writer.WriteHeader(204) c.Writer.WriteHeader(204)
return return
} }