From cb0139497734113b9b382bc20fc645e8610cbdce Mon Sep 17 00:00:00 2001 From: glaszig Date: Fri, 11 Dec 2015 02:12:27 +0100 Subject: [PATCH] simplified regexp matching of skip ci instruction in commit message --- controller/hook.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controller/hook.go b/controller/hook.go index 329fcac01..f435c3266 100644 --- a/controller/hook.go +++ b/controller/hook.go @@ -43,9 +43,9 @@ func PostHook(c *gin.Context) { // skip the build if any case-insensitive combination of the words "skip" and "ci" // wrapped in square brackets appear in the commit message - skipMatches := skipRe.FindStringSubmatch(build.Message) - if len(skipMatches) > 0 { - log.Infof("ignoring hook. %s found in %s", skipMatches[0], build.Commit) + skipMatch := skipRe.FindString(build.Message) + if len(skipMatch) > 0 { + log.Infof("ignoring hook. %s found in %s", skipMatch, build.Commit) c.Writer.WriteHeader(204) return }