@@ -399,13 +399,14 @@ func StartRepositoryTransfer(ctx context.Context, doer, newOwner *user_model.Use
399399 return err
400400 }
401401
402- var isTransfer bool
402+ var isDirectTransfer bool
403403 oldOwnerName := repo .OwnerName
404404
405405 if err := db .WithTx (ctx , func (ctx context.Context ) error {
406- // Admin is always allowed to transfer || user transfer repo back to his account
406+ // Admin is always allowed to transfer || user transfer repo back to his account,
407+ // then it will transfer directly without acceptance.
407408 if doer .IsAdmin || doer .ID == newOwner .ID {
408- isTransfer = true
409+ isDirectTransfer = true
409410 return transferOwnership (ctx , doer , newOwner .Name , repo , teams )
410411 }
411412
@@ -420,7 +421,7 @@ func StartRepositoryTransfer(ctx context.Context, doer, newOwner *user_model.Use
420421 return err
421422 }
422423 if allowed {
423- isTransfer = true
424+ isDirectTransfer = true
424425 return transferOwnership (ctx , doer , newOwner .Name , repo , teams )
425426 }
426427 }
@@ -443,7 +444,7 @@ func StartRepositoryTransfer(ctx context.Context, doer, newOwner *user_model.Use
443444 return err
444445 }
445446
446- if isTransfer {
447+ if isDirectTransfer {
447448 notify_service .TransferRepository (ctx , doer , repo , oldOwnerName )
448449 } else {
449450 // notify users who are able to accept / reject transfer
0 commit comments