From db43c59b26a7cdb567f4cf193c9a157eccc9d32e Mon Sep 17 00:00:00 2001 From: Shane <6071159+smashedr@users.noreply.github.com> Date: Thu, 26 Sep 2024 00:40:43 -0700 Subject: [PATCH] Set GIT_URL --- src/codeberg.sh | 4 ++-- src/main.sh | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/codeberg.sh b/src/codeberg.sh index 72ad58b..9b87929 100644 --- a/src/codeberg.sh +++ b/src/codeberg.sh @@ -17,10 +17,10 @@ EOF if [ "${USERNAME}" = "${OWNER}" ];then echo "Personal Repository Detected." - URL="${GIT_HOST}/api/v1/user/repos" + URL="${GIT_URL}/api/v1/user/repos" else echo "Organization Repository Detected." - URL="${GIT_HOST}/api/v1/orgs/${OWNER}/repos" + URL="${GIT_URL}/api/v1/orgs/${OWNER}/repos" fi echo "CREATE URL: ${URL}" diff --git a/src/main.sh b/src/main.sh index 2ca3b13..e747415 100644 --- a/src/main.sh +++ b/src/main.sh @@ -42,6 +42,9 @@ PASSWORD="${INPUT_PASSWORD:?err}" GIT_HOST=$(echo "${REMOTE_URL}" | awk -F'/' '{print $3}') echo "GIT_HOST: ${GIT_HOST}" +GIT_URL="https://${GIT_HOST}" +echo "GIT_URL: ${GIT_URL}" + if [ -n "${INPUT_CREATE}" ];then echo "Attempting Create Repository: ${INPUT_CREATE}" set +e