Skip to content

Commit

Permalink
Set GIT_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
smashedr committed Sep 26, 2024
1 parent 4764af7 commit db43c59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/codeberg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
3 changes: 3 additions & 0 deletions src/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit db43c59

Please sign in to comment.