Browse Source

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

tags/v1.2.0-rc1
lstahlman 无闻 9 years ago
parent
commit
0469d75a45
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      models/issue.go

+ 7
- 1
models/issue.go View File

@@ -160,7 +160,13 @@ func (i *Issue) State() string {
} }


func (issue *Issue) FullLink() 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. // IsPoster returns true if given user by ID is the poster.


Loading…
Cancel
Save