From 595acde39e8e00218e18490e598c92a94a5b5604 Mon Sep 17 00:00:00 2001 From: Khai Do Date: Mon, 3 Feb 2014 14:11:41 -0800 Subject: [PATCH] update comment filter for gerrit 2.8 In Gerrit 2.4.x stream event, comments contained just the comment. Gerrit 2.8 appends the patch id to the comment string. This change updates the regex to match on both 2.4 and 2.8 stream events. gerrit 2.4.x - "comment":"recheck no bug" gerrit 2.8.x - "comment":"Patch Set 4:\n\nrecheck no bug" Change-Id: I94799fc56719fb98cb04c44cda7e39a65722c088 --- modules/openstack_project/files/zuul/layout.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/openstack_project/files/zuul/layout.yaml b/modules/openstack_project/files/zuul/layout.yaml index d025e9e042..77f166384b 100644 --- a/modules/openstack_project/files/zuul/layout.yaml +++ b/modules/openstack_project/files/zuul/layout.yaml @@ -12,7 +12,7 @@ pipelines: - event: patchset-created - event: change-restored - event: comment-added - comment_filter: (?i)^\s*recheck(( (?:bug|lp)[\s#:]*(\d+))|( no bug))\s*$ + comment_filter: (?i)^(Patch Set [0-9]+:\n\n)?\s*recheck(( (?:bug|lp)[\s#:]*(\d+))|( no bug))\s*$ - event: comment-added require-approval: - username: jenkins @@ -23,7 +23,7 @@ pipelines: - username: jenkins older-than: 24h - event: comment-added - comment_filter: (?i)^\s*reverify( (?:bug|lp)[\s#:]*(\d+))\s*$ + comment_filter: (?i)^(Patch Set [0-9]+:\n\n)?\s*reverify( (?:bug|lp)[\s#:]*(\d+))\s*$ require-approval: - approved: 1 - username: jenkins @@ -131,7 +131,7 @@ pipelines: gerrit: - event: patchset-created - event: comment-added - comment_filter: (?i)^\s*recheck(( (?:bug|lp)[\s#:]*(\d+))|( no bug))\s*$ + comment_filter: (?i)^(Patch Set [0-9]+:\n\n)?\s*recheck(( (?:bug|lp)[\s#:]*(\d+))|( no bug))\s*$ - name: experimental description: On-demand pipeline for requesting a run against a set of jobs that are not yet gating. Leave review comment of "check experimental" to run jobs in this pipeline. @@ -140,7 +140,7 @@ pipelines: trigger: gerrit: - event: comment-added - comment_filter: (?i)^\s*check experimental\s*$ + comment_filter: (?i)^(Patch Set [0-9]+:\n\n)?\s*check experimental\s*$ success: gerrit: force-message: true @@ -200,7 +200,7 @@ pipelines: - event: patchset-created - event: change-restored - event: comment-added - comment_filter: (?i)^\s*recheck(( (?:bug|lp)[\s#:]*(\d+))|( no bug))\s*$ + comment_filter: (?i)^(Patch Set [0-9]+:\n\n)?\s*recheck(( (?:bug|lp)[\s#:]*(\d+))|( no bug))\s*$ success: gerrit: force-message: true @@ -218,7 +218,7 @@ pipelines: trigger: gerrit: - event: comment-added - comment_filter: (?i)^\s*check experimental\s*$ + comment_filter: (?i)^(Patch Set [0-9]+:\n\n)?\s*check experimental\s*$ success: gerrit: force-message: true