Просмотр исходного кода

add merger info and news feed

tags/v0.9.99
Unknwon 8 лет назад
Родитель
Сommit
842770d7fb
4 измененных файлов: 10 добавлений и 2 удалений
  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 Просмотреть файл

@@ -921,6 +921,7 @@ create_repo = created repository <a href="%s">%s</a>
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 Просмотреть файл

@@ -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
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


+ 5
- 0
templates/user/dashboard/feeds.tmpl Просмотреть файл

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

Загрузка…
Отмена
Сохранить