diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-09-25 22:36:07 -0400 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-09-25 22:36:07 -0400 |
commit | ad52b2d79125e2f4ca7c535f27184fb385fca79c (patch) | |
tree | 3c40579d1f8e38fd174fd1fe220b79fe6729c2be /models/action.go | |
parent | 977779cdcf893b2a6e148c1d4772efccef2dbe03 (diff) | |
download | gitea-ad52b2d79125e2f4ca7c535f27184fb385fca79c.tar.gz gitea-ad52b2d79125e2f4ca7c535f27184fb385fca79c.zip |
Mirror fix on transfer repo
Diffstat (limited to 'models/action.go')
-rw-r--r-- | models/action.go | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/models/action.go b/models/action.go index 46500a9260..3fb33f939a 100644 --- a/models/action.go +++ b/models/action.go @@ -350,10 +350,18 @@ func NewRepoAction(u *User, repo *Repository) (err error) { // TransferRepoAction adds new action for transfering repository. func TransferRepoAction(u, newUser *User, repo *Repository) (err error) { - if err = NotifyWatchers(&Action{ActUserId: u.Id, ActUserName: u.Name, ActEmail: u.Email, - OpType: TRANSFER_REPO, RepoId: repo.Id, RepoUserName: newUser.Name, - RepoName: repo.Name, - IsPrivate: repo.IsPrivate}); err != nil { + action := &Action{ + ActUserId: u.Id, + ActUserName: u.Name, + ActEmail: u.Email, + OpType: TRANSFER_REPO, + RepoId: repo.Id, + RepoUserName: newUser.Name, + RepoName: repo.Name, + IsPrivate: repo.IsPrivate, + Content: path.Join(repo.Owner.LowerName, repo.LowerName), + } + if err = NotifyWatchers(action); err != nil { log.Error(4, "NotifyWatchers: %d/%s", u.Id, repo.Name) return err } |