jenkins: www: Use GERRIT_REFSPEC directly

Change-Id: Iaee4e18b8ada727d84aa037364cf05747acf82c2
diff --git a/jenkins/www/leaf-www-preview.groovy b/jenkins/www/leaf-www-preview.groovy
index 634f7d2..dcff846 100644
--- a/jenkins/www/leaf-www-preview.groovy
+++ b/jenkins/www/leaf-www-preview.groovy
@@ -17,7 +17,7 @@
         stage('Pick commit'){
             steps {
                 sh '''#!/bin/bash
-                        git fetch origin refs/changes/${GERRIT_CHANGE_NUMBER: -2}/${GERRIT_CHANGE_NUMBER}/${GERRIT_PATCHSET_NUMBER}
+                        git fetch origin ${GERRIT_REFSPEC}
                         git checkout FETCH_HEAD
                 '''
             }
diff --git a/jenkins/www/leaf-www.groovy b/jenkins/www/leaf-www.groovy
index f4d246b..6331e81 100644
--- a/jenkins/www/leaf-www.groovy
+++ b/jenkins/www/leaf-www.groovy
@@ -17,7 +17,7 @@
 
                         export MASTER_IP="$(echo $SSH_CLIENT | cut -f1 -d ' ')"
                         export GERRIT_URL="ssh://LeafOS-Jenkins@review.leafos.org:29418/LeafOS-Project/leaf_www"
-                        ssh $MASTER_IP git -C /var/www/leafos.org/ fetch $GERRIT_URL refs/changes/${GERRIT_CHANGE_NUMBER: -2}/${GERRIT_CHANGE_NUMBER}/${GERRIT_PATCHSET_NUMBER}
+                        ssh $MASTER_IP git -C /var/www/leafos.org/ fetch ${GERRIT_URL} ${GERRIT_REFSPEC}
                         ssh $MASTER_IP git -C /var/www/leafos.org/ reset --hard FETCH_HEAD
                         ssh $MASTER_IP "cd /var/www/leafos.org; composer install"
                 '''