diff options
Diffstat (limited to 'services/repository/transfer.go')
-rw-r--r-- | services/repository/transfer.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/services/repository/transfer.go b/services/repository/transfer.go index 8c167552d..b9b26f314 100644 --- a/services/repository/transfer.go +++ b/services/repository/transfer.go @@ -8,7 +8,6 @@ import ( "fmt" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/organization" "code.gitea.io/gitea/models/perm" access_model "code.gitea.io/gitea/models/perm/access" @@ -61,7 +60,7 @@ func TransferOwnership(ctx context.Context, doer, newOwner *user_model.User, rep } // ChangeRepositoryName changes all corresponding setting from old repository name to new one. -func ChangeRepositoryName(doer *user_model.User, repo *repo_model.Repository, newRepoName string) error { +func ChangeRepositoryName(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, newRepoName string) error { log.Trace("ChangeRepositoryName: %s/%s -> %s", doer.Name, repo.Name, newRepoName) oldRepoName := repo.Name @@ -78,7 +77,7 @@ func ChangeRepositoryName(doer *user_model.User, repo *repo_model.Repository, ne repoWorkingPool.CheckOut(fmt.Sprint(repo.ID)) repo.Name = newRepoName - notification.NotifyRenameRepository(db.DefaultContext, doer, repo, oldRepoName) + notification.NotifyRenameRepository(ctx, doer, repo, oldRepoName) return nil } |