Allow less strict matching for gate
For example if workflow is set like:
GERRIT_EVENT_COMMENT_TEXT is Patch Set 2: Workflow+1 -Review-Priority
This should be still considered as gate.
Related-Prod: https://mirantis.jira.com/browse/PRODX-29379
Change-Id: I57724223af2adeb56463f9c07e20d7d306486a81
diff --git a/src/com/mirantis/mk/Gerrit.groovy b/src/com/mirantis/mk/Gerrit.groovy
index 7af195d..a10067f 100644
--- a/src/com/mirantis/mk/Gerrit.groovy
+++ b/src/com/mirantis/mk/Gerrit.groovy
@@ -552,7 +552,7 @@
common.infoMsg("GERRIT_EVENT_COMMENT_TEXT is ${gerritEventCommentTextStr}")
}
def gateComment = gerritEventCommentTextStr.split('\n')[0]
- if (gerritEventType == 'comment-added' && gateComment =~ /^Patch Set \d+:\s.*Workflow\+1$/) {
+ if (gerritEventType == 'comment-added' && gateComment =~ /^Patch Set \d+:\s.*Workflow\+1.*$/) {
common.infoMsg("Running in gate mode")
res = true
}