diff options
author | Nigel Babu <nigelb@redhat.com> | 2018-03-22 16:55:44 +0530 |
---|---|---|
committer | Nigel Babu <nigelb@redhat.com> | 2018-03-22 16:55:44 +0530 |
commit | d6108b2d1515cbd92313d6f91608fa30ca8cb083 (patch) | |
tree | a29b454070cda3c8bbb7813d4a699a415132604a /build-gluster-org | |
parent | f4cdebf5f9782a7686438e112d7e08967cbdce12 (diff) |
Fix issues with bugzilla post
Change-Id: I39baf7916a2883226229afbbdbe2186702c62628
Diffstat (limited to 'build-gluster-org')
-rw-r--r-- | build-gluster-org/scripts/bugzilla-post.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/build-gluster-org/scripts/bugzilla-post.sh b/build-gluster-org/scripts/bugzilla-post.sh index 8979135..e03150e 100644 --- a/build-gluster-org/scripts/bugzilla-post.sh +++ b/build-gluster-org/scripts/bugzilla-post.sh @@ -27,17 +27,16 @@ function update_bugzilla() fixes=0 fi - if [ -z "$bugid" ] ; then + if [[ -z "$bugid" ]] ; then # Needed for backward compatibility bugid=$(echo $GERRIT_CHANGE_COMMIT_MESSAGE | base64 -d | grep -i '^bug: ' | awk '{print $2}'); fi - # Gluster project moved to redhat around 2011 October, the bugzilla number then was 742000 - # Assumption is, anything below this number can be github issue. - if [ $bugid -lt 742000 ]; then - echo "Looks like a github issue ($bugid), treat it as not a bug" + if [[ -z "$bugid" ]] ; then + # This is commit only has a github issue return; fi + product=$(bugzilla query -b $bugid --outputformat='%{product}'); if [ "$product" != "GlusterFS" ]; then echo "Wrong product: $product" >&2; |