From f2b2c021f81581c1b81ffc8bf9247c87095be725 Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Mon, 5 Jun 2023 16:18:06 +1000 Subject: [PATCH] add in debug param --- parse-list.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/parse-list.sh b/parse-list.sh index 3a5316e..728935e 100755 --- a/parse-list.sh +++ b/parse-list.sh @@ -59,6 +59,7 @@ if [[ $(which $2 | grep "no $2") ]] ; then exit 1 fi +DEBUG= REVIEW= NOISY= GITEAHOST=${remote_GITEAHOST} @@ -75,6 +76,8 @@ for param in $3 $4 $5 $6; do ACCESSTOKEN=${local_GITEAACCESSTOKEN} EXTRAPARAMS=$EXTRAPARAMS" "$param ;; + debug ) + DEBUG=true ;; * ) EXTRAPARAMS=$EXTRAPARAMS" "$param ;; esac @@ -87,7 +90,7 @@ if [ $PROCESSORG ] ; then # cycle through the repos in the specified organisation # get a list of repositories in the source organisation for page in {1..10} ; do - if [ $DEBUG ] ; then echo "getting page $page of repos from $GITHOST $PROCESSORG" ; fi + if [ $DEBUG ] ; then echo "getting page $page of repos from $GITEAHOST $PROCESSORG" ; fi RESPONSE=$(curl -s -X 'GET' \ "$GITEAHOST/api/v1/orgs/$PROCESSORG/repos?page=$page" \ -H 'accept: application/json' \