mixed up source & target
This commit is contained in:
parent
b497a00693
commit
1aeb5b4c36
@ -165,22 +165,26 @@ fi
|
|||||||
# jq -r ' .external_wiki.external_wiki_url')
|
# jq -r ' .external_wiki.external_wiki_url')
|
||||||
#if [ $DEBUG ] ; then echo "WIKILINK=$WIKILINK" ; fi
|
#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
|
# migrate the source package over to target with updated fields
|
||||||
if [ $DEBUG ] ; then echo "Migrating $SOURCEORG/$SOURCEPKG as $TARGETORG/$1 on $TARGETHOST" ; fi
|
if [ $DEBUG ] ; then echo "Migrating $SOURCEORG/$SOURCEPKG as $TARGETORG/$1 on $TARGETHOST" ; fi
|
||||||
RESPONSE=$(curl $SILENT -k -X 'POST' \
|
RESPONSE=$(curl $SILENT -k -X 'POST' \
|
||||||
"$TARGETHOST/api/v1/repos/migrate" \
|
"$SOURCEHOST/api/v1/repos/migrate" \
|
||||||
-H 'accept: application/json' \
|
-H 'accept: application/json' \
|
||||||
-H "Authorization: token $TARGETACCESSTOKEN" \
|
-H "Authorization: token $SOURCEACCESSTOKEN" \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-d '{
|
-d "{ $DATA }"
|
||||||
"description": "'"SMEServer Koozali developed git repo for $TARGETPKG $BASEORCONTRIB"'",
|
|
||||||
"clone_addr": "'"$TARGETHOST/$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
|
# Update the repo with the changed description, bugzilla url and wiki url
|
||||||
#if [ $DEBUG ] ; then echo "Updating Description, Bug and Wiki links" ; fi
|
#if [ $DEBUG ] ; then echo "Updating Description, Bug and Wiki links" ; fi
|
||||||
|
Loading…
Reference in New Issue
Block a user