Skip to content
This repository was archived by the owner on May 27, 2026. It is now read-only.

Commit 4c75501

Browse files
notorious-gaywei
andauthored
fix: git URI matching for GitHub fallback (#30)
* Only remap upstream to github if it does not look like a valid git URI This allows the user to use this action to pull a glitch.com repo to github as they too do not use the .git suffix Co-authored-by: Wei He <git@weispot.com>
1 parent 32f5a76 commit 4c75501

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

github-sync.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ if [[ -z "$BRANCH_MAPPING" ]]; then
1515
exit 1
1616
fi
1717

18-
if ! echo $UPSTREAM_REPO | grep '\.git'
18+
if ! echo $UPSTREAM_REPO | grep -Eq ':|@|\.git\/?$'
1919
then
20+
echo "UPSTREAM_REPO does not seem to be a valid git URI, assuming it's a GitHub repo"
21+
echo "Originally: $UPSTREAM_REPO"
2022
UPSTREAM_REPO="https://github.com/${UPSTREAM_REPO}.git"
23+
echo "Now: $UPSTREAM_REPO"
2124
fi
2225

2326
echo "UPSTREAM_REPO=$UPSTREAM_REPO"

0 commit comments

Comments
 (0)