? accesstokens ?

This commit is contained in:
Trevor Batley 2023-06-04 17:50:56 +10:00
parent 1aeb5b4c36
commit 80f76cf8ac

View File

@ -165,7 +165,14 @@ fi
# jq -r ' .external_wiki.external_wiki_url')
#if [ $DEBUG ] ; then echo "WIKILINK=$WIKILINK" ; fi
DATA=$(cat << 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' \
"$SOURCEHOST/api/v1/repos/migrate" \
-H 'accept: application/json' \
-H "Authorization: token $SOURCEACCESSTOKEN" \
-H 'Content-Type: application/json' \
-d {
"auth_token": "$SOURCEACCESSTOKEN",
"description": "'"SMEServer Koozali developed git repo for $TARGETPKG $BASEORCONTRIB"'",
"clone_addr": "'"$SOURCEHOST/$TARGETORG/$TARGETPKG.git"'",
@ -174,17 +181,7 @@ DATA=$(cat << EOT
"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' \
"$SOURCEHOST/api/v1/repos/migrate" \
-H 'accept: application/json' \
-H "Authorization: token $SOURCEACCESSTOKEN" \
-H 'Content-Type: application/json' \
-d "{ $DATA }"
)'
)
# Update the repo with the changed description, bugzilla url and wiki url
#if [ $DEBUG ] ; then echo "Updating Description, Bug and Wiki links" ; fi