Move some actions to notification/action (#8779)

* Move some actions to notification/action

* Fix test

* fix test
This commit is contained in:
Lunny Xiao 2019-11-09 04:54:50 +08:00 committed by techknowlogick
parent fb459f2c2c
commit 016a5d0438
10 changed files with 88 additions and 107 deletions

View file

@ -603,11 +603,7 @@ func updateBasicProperties(ctx *context.APIContext, opts api.EditRepoOption) err
return err
}
if err := models.RenameRepoAction(ctx.User, oldRepoName, repo); err != nil {
log.Error("RenameRepoAction: %v", err)
ctx.Error(http.StatusInternalServerError, "RenameRepoActions", err)
return err
}
notification.NotifyRenameRepository(ctx.User, repo, oldRepoName)
log.Trace("Repository name changed: %s/%s -> %s", ctx.Repo.Owner.Name, repo.Name, newRepoName)
}