File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,8 @@ del.merge_request.id ()
7474get.commit.status ()
7575{ # $1=project, $2=sha
7676 api " GET" " projects/${1} /repository/commits/${2} /statuses" \
77- | jq -r ' .[].status'
77+ | jq -r ' .[].status' \
78+ | tr -d ' [:space:]'
7879}
7980
8081poll.commit.status ()
@@ -83,21 +84,19 @@ poll.commit.status ()
8384 local status laststatus
8485
8586 let attempt+=1
86- laststatus=" pending"
87- status=" new"
8887
8988 while true ; do
9089 attempt=$(( $attempt + 1 ))
91- status=$( get.commit.status " ${1} " " ${2} " )
90+ status=$( echo $( get.commit.status " ${1} " " ${2} " ) )
9291
9392 info " polling commit status: ${attempt} "
9493
9594 case " ${status:- } " in
9695 success) return 0 ;;
9796 failed) return 1 ;;
9897 canceled) return 1 ;;
99- * ) if [ " ${status} " != " ${laststatus} " ]; then
100- info " - pipeline in ${status} was ${laststatus:- } "
98+ * ) if [ " ${status} " != " ${laststatus:- } " ]; then
99+ info " - pipeline in ${status:- none } was ${laststatus:- none } "
101100 fi
102101 ;;
103102 esac
You can’t perform that action at this time.
0 commit comments