diff options
author | Nigel Babu <nigelb@redhat.com> | 2017-08-21 18:22:16 +0530 |
---|---|---|
committer | Deepshikha Khandelwal <dkhandel@redhat.com> | 2017-08-23 10:25:08 +0000 |
commit | 7759b4f154b3ee0120f197059ac35542f41118e2 (patch) | |
tree | 7b83706ad0e3a40ca8ce3c10efee6cce4f430044 | |
parent | bcb5f36ad2d05a014a18ae7162494dc72e3c6fd8 (diff) |
Fix issues with the bugzilla-post logic
Change-Id: Ib95a75f1ab619190933a8dab33b0044388621f48
Signed-off-by: Nigel Babu <nigelb@redhat.com>
-rw-r--r-- | build-gluster-org/scripts/bugzilla-post.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/build-gluster-org/scripts/bugzilla-post.sh b/build-gluster-org/scripts/bugzilla-post.sh index 79d09d3..e0ac7b1 100644 --- a/build-gluster-org/scripts/bugzilla-post.sh +++ b/build-gluster-org/scripts/bugzilla-post.sh @@ -3,10 +3,10 @@ function commit_message_edited() { if [ "$GERRIT_PATCHSET_NUMBER" != "1" ]; then - OLD_PATCHSET_NUM=$GERRIT_PATCHSET_NUMBER-1 - old_bugid=$(curl -X GET https://review.gluster.org/changes/${GERRIT_PROJECT}~${GERRIT_BRANCH}~${GERRIT_CHANGE_ID}/revisions/$OLD_PATCHSET_NUM/commit | grep subject | awk -F'"' '{print $4}' | sed 's/\\n/\'$'\n''/g' | grep -i '^bug: ' | awk '{print $2}') + OLD_PATCHSET_NUM="$(($GERRIT_PATCHSET_NUMBER-1))" + old_bugid=$(curl -X GET https://review.gluster.org/changes/${GERRIT_PROJECT}~${GERRIT_BRANCH}~${GERRIT_CHANGE_ID}/revisions/$OLD_PATCHSET_NUM/commit | grep message | awk -F'"' '{print $4}' | sed 's/\\n/\'$'\n''/g' | grep -i '^bug: ' | awk '{print $2}') if [ "$bugid" == "$old_bugid" ]; then - return; + exit 0 fi fi } |