hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject hbase git commit: HBASE-12347 Improve the logic for checking JIRA status
Date Thu, 13 Nov 2014 05:52:55 GMT
Repository: hbase
Updated Branches:
  refs/heads/master f641aada3 -> 04cb13814


HBASE-12347 Improve the logic for checking JIRA status


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/04cb1381
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/04cb1381
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/04cb1381

Branch: refs/heads/master
Commit: 04cb1381428974718a3e388484b659f5e39b305b
Parents: f641aad
Author: Misty Stanley-Jones <mstanleyjones@cloudera.com>
Authored: Mon Oct 27 15:38:56 2014 +1000
Committer: Misty Stanley-Jones <mstanleyjones@cloudera.com>
Committed: Thu Nov 13 15:52:41 2014 +1000

----------------------------------------------------------------------
 dev-support/rebase_all_git_branches.sh | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/04cb1381/dev-support/rebase_all_git_branches.sh
----------------------------------------------------------------------
diff --git a/dev-support/rebase_all_git_branches.sh b/dev-support/rebase_all_git_branches.sh
index 1936470..261faa8 100755
--- a/dev-support/rebase_all_git_branches.sh
+++ b/dev-support/rebase_all_git_branches.sh
@@ -72,17 +72,15 @@ function get_jira_status {
   # span id="resolution-val" class="value resolved" >
   # The following is a bit brittle, but filters for lines with 
   # resolution-val returns 99 if it's resolved
-  jira_url='https://issues.apache.org/jira/browse'
+  jira_url='https://issues.apache.org/jira/rest/api/2/issue'
   jira_id="$1"
-  status="$(curl -s $jira_url/$jira_id | \
-                grep resolution-val | \
-                sed -e "s/.*class=\"value\ //" | \
-                cut -d'"' -f 1)"
-  if [ $? -ne 0 ]; then
+  curl -s "$jira_url/$jira_id?fields=resolution" |grep -q '{"resolution":null}'
+  status=$?
+  if [ $status -ne 0 -a $status -ne 1 ]; then
     echo "Could not get JIRA status. Check your network." >&2
     exit 1
   fi
-  if [ "$status" = "resolved" ]; then
+  if [ $status -ne 0 ]; then
     return 99
   fi
 }


Mime
View raw message