We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 52069fb commit 8b11d35Copy full SHA for 8b11d35
1 file changed
docs/replication/create-forks-on-github.sh
@@ -54,8 +54,16 @@ while IFS= read -d '' -r repository
54
do
55
echo
56
run cd "$repository"
57
- run gh repo fork --remote
58
- run git push -f origin
+ url="$(git remote get-url origin)"
+ if [[ "$url" ~= github.com ]]
59
+ then
60
+ echo "$repository is a github repo"
61
+ run gh repo fork --remote
62
+ run git push -f origin
63
+ else
64
+ echo "$repository is not a github repo"
65
+ run gh repo create "$repository" -d "Fork of $url" --push --public --source .
66
+ fi
67
done
68
69
if [ "$was_logged_in" = "1" ]
0 commit comments