summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorAlexey Makhov <amakhov@avito.ru>2015-11-12 23:09:48 +0300
committerAlexey Makhov <amakhov@avito.ru>2015-11-12 23:09:48 +0300
commit588a0db21869828c4ba1006855ed6454ca878068 (patch)
treebcb6d2688874d7046f065f09847aaac96b57eb50 /models
parentd1e28ac013c2f562939025e6a031671a5a70dd52 (diff)
downloadgitea-588a0db21869828c4ba1006855ed6454ca878068.tar.gz
gitea-588a0db21869828c4ba1006855ed6454ca878068.zip
#1854 issue title at dashboard
Diffstat (limited to 'models')
-rw-r--r--models/action.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/models/action.go b/models/action.go
index e94bb9441b..11a2de0339 100644
--- a/models/action.go
+++ b/models/action.go
@@ -10,6 +10,7 @@ import (
"fmt"
"path"
"regexp"
+ "strconv"
"strings"
"time"
"unicode"
@@ -136,6 +137,12 @@ func (a Action) GetIssueInfos() []string {
return strings.SplitN(a.Content, "|", 2)
}
+func (a Action) GetIssueTitle() string {
+ issueID, _ := strconv.Atoi(strings.SplitN(a.Content, "|", 2)[0])
+ issue, _ := GetIssueByID(int64(issueID))
+ return issue.Name
+}
+
func newRepoAction(e Engine, u *User, repo *Repository) (err error) {
if err = notifyWatchers(e, &Action{
ActUserID: u.Id,