@@ -410,14 +410,14 @@ func RenameBranch(ctx context.Context, repo *repo_model.Repository, doer *user_m
410
410
log .Error ("DeleteCronTaskByRepo: %v" , err )
411
411
}
412
412
// cancel running cron jobs of this repository and delete old schedules
413
- if err := actions_model .CancelRunningJobs (
413
+ if err := actions_model .CancelPreviousJobs (
414
414
ctx ,
415
415
repo .ID ,
416
416
from ,
417
417
"" ,
418
418
webhook_module .HookEventSchedule ,
419
419
); err != nil {
420
- log .Error ("CancelRunningJobs : %v" , err )
420
+ log .Error ("CancelPreviousJobs : %v" , err )
421
421
}
422
422
423
423
err2 = gitrepo .SetDefaultBranch (ctx , repo , to )
@@ -575,14 +575,14 @@ func SetRepoDefaultBranch(ctx context.Context, repo *repo_model.Repository, gitR
575
575
log .Error ("DeleteCronTaskByRepo: %v" , err )
576
576
}
577
577
// cancel running cron jobs of this repository and delete old schedules
578
- if err := actions_model .CancelRunningJobs (
578
+ if err := actions_model .CancelPreviousJobs (
579
579
ctx ,
580
580
repo .ID ,
581
581
oldDefaultBranchName ,
582
582
"" ,
583
583
webhook_module .HookEventSchedule ,
584
584
); err != nil {
585
- log .Error ("CancelRunningJobs : %v" , err )
585
+ log .Error ("CancelPreviousJobs : %v" , err )
586
586
}
587
587
588
588
if err := gitrepo .SetDefaultBranch (ctx , repo , newBranchName ); err != nil {
0 commit comments