Browse Source

add merger info and news feed

for-closed-social
Unknwon 9 years ago
parent
commit
842770d7fb
4 changed files with 10 additions and 2 deletions
  1. +1
    -0
      conf/locale/locale_en-US.ini
  2. +2
    -0
      models/issue.go
  3. +2
    -2
      modules/bindata/bindata.go
  4. +5
    -0
      templates/user/dashboard/feeds.tmpl

+ 1
- 0
conf/locale/locale_en-US.ini View File

@ -921,6 +921,7 @@ create_repo = created repository %s
rename_repo = renamed repository from <code>%[1]s</code> to <a href="%[2]s">%[3]s</a>
commit_repo = pushed to <a href="%s/src/%s">%[2]s</a> at <a href="%[1]s">%[3]s</a>
create_issue = `opened issue <a href="%s/issues/%s">%s#%[2]s</a>`
create_pull_request = `created pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
comment_issue = `commented on issue <a href="%s/issues/%s">%s#%[2]s</a>`
transfer_repo = transfered repository <code>%s</code> to <a href="%s">%s</a>
push_tag = pushed tag <a href="%s/src/%s">%[2]s</a> to <a href="%[1]s">%[3]s</a>

+ 2
- 0
models/issue.go View File

@ -925,6 +925,8 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository) (err error
}
pr.HasMerged = true
pr.Merged = time.Now()
pr.MergerID = doer.Id
if _, err = sess.Id(pr.ID).AllCols().Update(pr); err != nil {
return fmt.Errorf("update pull request: %v", err)
}

+ 2
- 2
modules/bindata/bindata.go
File diff suppressed because it is too large
View File


+ 5
- 0
templates/user/dashboard/feeds.tmpl View File

@ -15,6 +15,9 @@
{{else if eq .GetOpType 6}}
{{ $index := index .GetIssueInfos 0}}
{{$.i18n.Tr "action.create_issue" .GetRepoLink $index .GetRepoPath | Str2html}}
{{else if eq .GetOpType 7}}
{{ $index := index .GetIssueInfos 0}}
{{$.i18n.Tr "action.create_pull_request" .GetRepoLink $index .GetRepoPath | Str2html}}
{{else if eq .GetOpType 8}}
{{$.i18n.Tr "action.transfer_repo" .GetContent .GetRepoLink .GetRepoPath | Str2html}}
{{else if eq .GetOpType 9}}
@ -39,6 +42,8 @@
</div>
{{else if eq .GetOpType 6}}
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
{{else if eq .GetOpType 7}}
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
{{else if eq .GetOpType 10}}
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
{{end}}

Loading…
Cancel
Save