diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-11-09 04:54:50 +0800 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-11-08 15:54:50 -0500 |
commit | 016a5d0438e551d4630819683dd6dc4fccb0cb51 (patch) | |
tree | be5adb9e41fdd3e0b1528cca0c9e111ff81b4eb7 /routers/repo/setting.go | |
parent | fb459f2c2c32dda29870731b6dae1452bbab625f (diff) | |
download | gitea-016a5d0438e551d4630819683dd6dc4fccb0cb51.tar.gz gitea-016a5d0438e551d4630819683dd6dc4fccb0cb51.zip |
Move some actions to notification/action (#8779)
* Move some actions to notification/action
* Fix test
* fix test
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r-- | routers/repo/setting.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go index 663394fe3d..95cba3cbf2 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -20,6 +20,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/validation" @@ -121,9 +122,7 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) { log.Trace("Repository basic settings updated: %s/%s", ctx.Repo.Owner.Name, repo.Name) if isNameChanged { - if err := models.RenameRepoAction(ctx.User, oldRepoName, repo); err != nil { - log.Error("RenameRepoAction: %v", err) - } + notification.NotifyRenameRepository(ctx.User, repo, oldRepoName) } ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) |