1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Show private repository activities in dashboard if has access

This commit is contained in:
Unknown
2014-05-08 19:17:43 -04:00
parent a742ee543e
commit 914ffa496f
6 changed files with 54 additions and 13 deletions

View File

@@ -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
}