From 80f76cf8ac64abfe6c830c4b1cd08f08eef043fa Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Sun, 4 Jun 2023 17:50:56 +1000 Subject: [PATCH] ? accesstokens ? --- rename-e-smith-pkg.sh | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/rename-e-smith-pkg.sh b/rename-e-smith-pkg.sh index 63f63c0..7909ab9 100755 --- a/rename-e-smith-pkg.sh +++ b/rename-e-smith-pkg.sh @@ -165,18 +165,6 @@ fi # jq -r ' .external_wiki.external_wiki_url') #if [ $DEBUG ] ; then echo "WIKILINK=$WIKILINK" ; fi -DATA=$(cat << EOT - "auth_token": "$SOURCEACCESSTOKEN", - "description": "'"SMEServer Koozali developed git repo for $TARGETPKG $BASEORCONTRIB"'", - "clone_addr": "'"$SOURCEHOST/$TARGETORG/$TARGETPKG.git"'", - "repo_name": "'"$TARGETPKG"'", - "repo_owner": "'"$TARGETORG"'", - "external_tracker": { - "external_tracker_url": "'"https://bugs.koozali.org/buglist.cgi?component=$TARGETPKG&product=$PRODUCTBUGZILLA"'" - } - EOT -) - # migrate the source package over to target with updated fields if [ $DEBUG ] ; then echo "Migrating $SOURCEORG/$SOURCEPKG as $TARGETORG/$1 on $TARGETHOST" ; fi RESPONSE=$(curl $SILENT -k -X 'POST' \ @@ -184,7 +172,16 @@ RESPONSE=$(curl $SILENT -k -X 'POST' \ -H 'accept: application/json' \ -H "Authorization: token $SOURCEACCESSTOKEN" \ -H 'Content-Type: application/json' \ - -d "{ $DATA }" + -d { + "auth_token": "$SOURCEACCESSTOKEN", + "description": "'"SMEServer Koozali developed git repo for $TARGETPKG $BASEORCONTRIB"'", + "clone_addr": "'"$SOURCEHOST/$TARGETORG/$TARGETPKG.git"'", + "repo_name": "'"$TARGETPKG"'", + "repo_owner": "'"$TARGETORG"'", + "external_tracker": { + "external_tracker_url": "'"https://bugs.koozali.org/buglist.cgi?component=$TARGETPKG&product=$PRODUCTBUGZILLA"'" + } + )' ) # Update the repo with the changed description, bugzilla url and wiki url #if [ $DEBUG ] ; then echo "Updating Description, Bug and Wiki links" ; fi