eclair/post_gerrit_comment.sh: Don't post comment if there's no review

E.g. if run manually for a test.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: Ic1607f800324eec94acf22b1ba1e8ac7b20afd7d
diff --git a/eclair/post_gerrit_comment.sh b/eclair/post_gerrit_comment.sh
index ec83e9e..b12666e 100755
--- a/eclair/post_gerrit_comment.sh
+++ b/eclair/post_gerrit_comment.sh
@@ -20,6 +20,11 @@
     should_post_comment=1
 fi
 
+# If run without a patch (e.g. for debugging, don't try to post comment.
+if [ -z "$GERRIT_CHANGE_NUMBER" ]; then
+    should_post_comment=0
+fi
+
 if [ $should_post_comment -eq 1 ]; then
     mkdir -p ~/.ssh/
     ssh-keyscan -H -p 29418 $GERRIT_HOST >> ~/.ssh/known_hosts