From 8644c571dbcb964a338565c8042ff71957030e52 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 25 Jun 2014 05:27:17 -0400 Subject: [PATCH] Mirror bug fix on create repo action --- models/action.go | 3 ++- models/repo.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/models/action.go b/models/action.go index bbbe2134..55557da2 100644 --- a/models/action.go +++ b/models/action.go @@ -184,7 +184,8 @@ func CommitRepoAction(userId, repoUserId int64, userName, actEmail string, // NewRepoAction adds new action for creating repository. func NewRepoAction(u *User, repo *Repository) (err error) { if err = NotifyWatchers(&Action{ActUserId: u.Id, ActUserName: u.Name, ActEmail: u.Email, - OpType: OP_CREATE_REPO, RepoId: repo.Id, RepoName: repo.Name, IsPrivate: repo.IsPrivate}); err != nil { + OpType: OP_CREATE_REPO, RepoId: repo.Id, RepoUserName: repo.Owner.Name, RepoName: repo.Name, + IsPrivate: repo.IsPrivate}); err != nil { log.Error("action.NewRepoAction(notify watchers): %d/%s", u.Id, repo.Name) return err } diff --git a/models/repo.go b/models/repo.go index 9cf90a94..728f14a7 100644 --- a/models/repo.go +++ b/models/repo.go @@ -475,6 +475,7 @@ func CreateRepository(u *User, name, desc, lang, license string, private, mirror repo := &Repository{ OwnerId: u.Id, + Owner: u, Name: name, LowerName: strings.ToLower(name), Description: desc,