From 501f70e248660d51e5eb8f2343b1a19db8679c21 Mon Sep 17 00:00:00 2001 From: jiangjianxiao Date: Fri, 9 May 2014 14:42:50 +0800 Subject: [PATCH] fix news feed repo link --- models/action.go | 4 ++++ modules/base/template.go | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/models/action.go b/models/action.go index 6c18d022d0..62cff86277 100644 --- a/models/action.go +++ b/models/action.go @@ -63,6 +63,10 @@ func (a Action) GetActEmail() string { return a.ActEmail } +func (a Action) GetRepoUserName() string { + return a.RepoUserName +} + func (a Action) GetRepoName() string { return a.RepoName } diff --git a/modules/base/template.go b/modules/base/template.go index 135be107f2..b9449e30af 100644 --- a/modules/base/template.go +++ b/modules/base/template.go @@ -100,6 +100,7 @@ type Actioner interface { GetOpType() int GetActUserName() string GetActEmail() string + GetRepoUserName() string GetRepoName() string GetBranch() string GetContent() string @@ -153,8 +154,9 @@ type PushCommits struct { func ActionDesc(act Actioner) string { actUserName := act.GetActUserName() email := act.GetActEmail() + repoUserName := act.GetRepoUserName() repoName := act.GetRepoName() - repoLink := actUserName + "/" + repoName + repoLink := repoUserName + "/" + repoName branch := act.GetBranch() content := act.GetContent() switch act.GetOpType() {