Browse Source

Fix for #3401 Links of pull request comment email should use pulls URL (#3403)

pull/3412/head
lstahlman 9 years ago committed by 无闻
parent
commit
699c71d319
  1. 8
      models/issue.go

8
models/issue.go

@ -160,7 +160,13 @@ func (i *Issue) State() string {
}
func (issue *Issue) FullLink() string {
return fmt.Sprintf("%s/issues/%d", issue.Repo.FullLink(), issue.Index)
var path string
if issue.IsPull {
path = "pulls"
} else {
path = "issues"
}
return fmt.Sprintf("%s/%s/%d", issue.Repo.FullLink(), path, issue.Index)
}
// IsPoster returns true if given user by ID is the poster.

Loading…
Cancel
Save