Skip to content
Snippets Groups Projects
Commit c7beb023 authored by dylan.peiry's avatar dylan.peiry
Browse files

fix(gitcreate) visibility arg

parent b1e97bf3
No related branches found
No related tags found
No related merge requests found
......@@ -25,9 +25,15 @@ fi
# The name of the repository will be the name of the current directory
NAME=$(basename $PWD)
USERNAME=$1
VISIBILITY=$2
PUBLIC=$2
ACCESS_METHOD=$3
echo $ACCESS_METHOD
VISIBILITY=""
if [[ $PUBLIC == "true" ]]; then
VISIBILITY="public"
else
VISIBILITY="private"
fi
# Define the remote origin (url on which we will link the local repository)
REMOTE_ORIGIN=""
......@@ -41,7 +47,7 @@ echo $REMOTE_ORIGIN
# Call the api to create the repository with the specified name
RESPONSE=$(curl -X POST 'https://gitedu.hesge.ch/api/v4/projects?private_token='$ACCESS_TOKEN'' \
-d '{"name":"'$NAME'","path":"'$NAME'"}' \
-d '{"name":"'$NAME'","path":"'$NAME'","visibility":"'$VISIBILITY'"}' \
-H "Content-Type: application/json" \
-silent)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment