Skip to content

Commit a5c69ef

Browse files
committed
fork_my_feedstocks.py: Create remotes locally.
1 parent 18f70ea commit a5c69ef

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

scripts/fork_my_feedstocks.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,16 @@
6262
each_feedstock_repo = each_feedstock
6363
if not each_feedstock_repo.endswith("-feedstock"):
6464
each_feedstock_repo += "-feedstock"
65-
repo = gh_org.get_repo(each_feedstock_repo)
66-
gh_me.create_fork(repo)
65+
repo = git.Repo(each_feedstock_dir)
66+
remote_repo = gh_org.get_repo(each_feedstock_repo)
67+
fork_resp = gh_me.create_fork(remote_repo)
68+
69+
# Add the remote repos locally.
70+
for user, url in [
71+
(remote_repo.owner.login, remote_repo.clone_url),
72+
(fork_resp.owner.login, fork_resp.ssh_url)
73+
]:
74+
try:
75+
remote = repo.create_remote(user, url)
76+
except git.exc.GitCommandError:
77+
pass

0 commit comments

Comments
 (0)