FIX: Handling of git topic when push upstream

Change-Id: Ia0004612aee7724d2db3cc435b64d4f9dcc06608
diff --git a/jjb/opendev/push-upstream-jobs.sh b/jjb/opendev/push-upstream-jobs.sh
index 0e1326f..7f2a696 100755
--- a/jjb/opendev/push-upstream-jobs.sh
+++ b/jjb/opendev/push-upstream-jobs.sh
@@ -58,9 +58,9 @@
 # GERRIT_TOPIC is the rest of the refspec after GERRIT_BRANCH when the topic
 # is set for the change.
 if [ -z "${GERRIT_TOPIC:-}" ] ; then
-    refspec="$commit_hash:refs/for/$GERRIT_BRANCH"
+    refspec="${commit_hash}:refs/for/${GERRIT_BRANCH}"
 else
-    refspec="$commit_hash:refs/for/$GERRIT_BRANCH/$GERRIT_TOPIC"
+    refspec="${commit_hash}:refs/for/${GERRIT_BRANCH}%topic=${GERRIT_TOPIC}"
 fi
 
 echo >&2 "Pushing to OpenDev"