From 5de98f124fc477c6ee83ad9052bc6eb29022063c Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 2 Apr 2015 12:18:37 -0400 Subject: [PATCH] fix hideci regex to work on /#/c/XXXXX/YY There previous regex had a bug which meant that the Toggle CI button and functionality wouldn't trigger when browsing to a change which included the revision number. This updates the regex to match in those conditions. Change-Id: Icc3d580d063c3a64f9d2b7e7d6a46e67afe0c779 --- modules/openstack_project/files/gerrit/hideci.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openstack_project/files/gerrit/hideci.js b/modules/openstack_project/files/gerrit/hideci.js index e8eee4bbcf..56c5703276 100644 --- a/modules/openstack_project/files/gerrit/hideci.js +++ b/modules/openstack_project/files/gerrit/hideci.js @@ -14,7 +14,7 @@ // under the License. // this regex matches the hash part of review pages -var hashRegex = /^\#\/c\/([\d]+)(\/([\/\d+])?)?$/; +var hashRegex = /^\#\/c\/([\d]+)(\/(\d+)?\/?)?$/; // this regex matches CI comments var ciRegex = /^(.* CI|Jenkins)$/; // this regex matches "Patch set #"