File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -961,7 +961,8 @@ def push_to_repository(
961
961
@lock_git_operation ()
962
962
def fork (self , owner : str , repo_name : str ):
963
963
if repo_name in self ._repos :
964
- raise ValueError (f"Fork of { repo_name } already exists." )
964
+ logger .debug (f"Fork of { repo_name } already exists. Doing nothing." )
965
+ return
965
966
966
967
logger .debug (
967
968
f"Dry Run: Creating fork of { owner } /{ repo_name } for user { self ._USER } ."
Original file line number Diff line number Diff line change @@ -1635,11 +1635,8 @@ def test_dry_run_backend_fork(caplog):
1635
1635
in caplog .text
1636
1636
)
1637
1637
1638
- with pytest .raises (ValueError , match = "Fork of REPO already exists" ):
1639
- backend .fork ("UPSTREAM_OWNER" , "REPO" )
1640
-
1641
- with pytest .raises (ValueError , match = "Fork of REPO already exists" ):
1642
- backend .fork ("OTHER_OWNER" , "REPO" )
1638
+ # this should not raise an error
1639
+ backend .fork ("UPSTREAM_OWNER" , "REPO" )
1643
1640
1644
1641
1645
1642
def test_dry_run_backend_sync_default_branch (caplog ):
You can’t perform that action at this time.
0 commit comments