diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-08 19:17:43 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-08 19:17:43 -0400 |
commit | 914ffa496f8e8e9948ca8c5596da6b0d3c17555d (patch) | |
tree | 5f2fc88ee51db05013f968031bc8340f4867f48d /routers/repo | |
parent | a742ee543ef3faf6374625c9c6d065c0a46b5549 (diff) | |
download | gitea-914ffa496f8e8e9948ca8c5596da6b0d3c17555d.tar.gz gitea-914ffa496f8e8e9948ca8c5596da6b0d3c17555d.zip |
Show private repository activities in dashboard if has access
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/issue.go | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 1f681c39fd..3343800663 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -178,10 +178,20 @@ func CreateIssuePost(ctx *middleware.Context, params martini.Params, form auth.C } } + act := &models.Action{ + ActUserId: ctx.User.Id, + ActUserName: ctx.User.Name, + ActEmail: ctx.User.Email, + OpType: models.OP_CREATE_ISSUE, + Content: fmt.Sprintf("%d|%s", issue.Index, issue.Name), + RepoId: ctx.Repo.Repository.Id, + RepoUserName: ctx.Repo.Owner.Name, + RepoName: ctx.Repo.Repository.Name, + RefName: ctx.Repo.BranchName, + IsPrivate: ctx.Repo.Repository.IsPrivate, + } // Notify watchers. - if err := models.NotifyWatchers(&models.Action{ActUserId: ctx.User.Id, ActUserName: ctx.User.Name, ActEmail: ctx.User.Email, - OpType: models.OP_CREATE_ISSUE, Content: fmt.Sprintf("%d|%s", issue.Index, issue.Name), - RepoId: ctx.Repo.Repository.Id, RepoName: ctx.Repo.Repository.Name, RefName: ""}); err != nil { + if err := models.NotifyWatchers(act); err != nil { ctx.Handle(500, "issue.CreateIssue(NotifyWatchers)", err) return } |