summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--models/issue.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/models/issue.go b/models/issue.go
index 4a6f9b278a..b142a5de7c 100644
--- a/models/issue.go
+++ b/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.