File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -476,6 +476,34 @@ def run(
476
476
rerender : bool = True ,
477
477
base_branch : str = "main" ,
478
478
** kwargs : typing .Any ,
479
+ ) -> tuple [MigrationUidTypedDict , dict ] | tuple [Literal [False ], Literal [False ]]:
480
+ """
481
+ For a given feedstock and migration run the migration in a temporary directory that will be deleted after the
482
+ migration is complete.
483
+
484
+ The parameters are the same as for the `run` function. The only difference is that you pass a FeedstockContext
485
+ instance instead of a ClonedFeedstockContext instance.
486
+
487
+ The exceptions are the same as for the `run` function.
488
+ """
489
+ with context .reserve_clone_directory () as cloned_context :
490
+ return run (
491
+ context = cloned_context ,
492
+ migrator = migrator ,
493
+ rerender = rerender ,
494
+ base_branch = base_branch ,
495
+ dry_run = dry_run ,
496
+ ** kwargs ,
497
+ )
498
+
499
+
500
+ def run (
501
+ context : ClonedFeedstockContext ,
502
+ migrator : Migrator ,
503
+ rerender : bool = True ,
504
+ base_branch : str = "main" ,
505
+ dry_run : bool = False ,
506
+ ** kwargs : typing .Any ,
479
507
) -> tuple [MigrationUidTypedDict , dict ] | tuple [Literal [False ], Literal [False ]]:
480
508
"""For a given feedstock and migration run the migration
481
509
Original file line number Diff line number Diff line change 26
26
}
27
27
)
28
28
29
+
29
30
def test_feedstock_context_default_branch_not_set ():
30
31
context = FeedstockContext ("TEST-FEEDSTOCK-NAME" , demo_attrs )
31
32
assert context .default_branch == "main"
You can’t perform that action at this time.
0 commit comments