simplified regexp matching of skip ci instruction in commit message
This commit is contained in:
parent
845d437256
commit
cb01394977
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue