Skip to content

Commit fb81509

Browse files
committed
Fix 404 for external tracking issues
1 parent abb19ef commit fb81509

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

routers/repo/issue.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,10 @@ func DeleteComment(ctx *context.Context) {
965965

966966
// Milestones render milestones page
967967
func Milestones(ctx *context.Context) {
968+
MustEnableIssues(ctx)
969+
if ctx.Written() {
970+
return
971+
}
968972
ctx.Data["Title"] = ctx.Tr("repo.milestones")
969973
ctx.Data["PageIsIssueList"] = true
970974
ctx.Data["PageIsMilestones"] = true

routers/repo/issue_label.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ const (
1818

1919
// Labels render issue's labels page
2020
func Labels(ctx *context.Context) {
21+
MustEnableIssues(ctx)
22+
if ctx.Written() {
23+
return
24+
}
2125
ctx.Data["Title"] = ctx.Tr("repo.labels")
2226
ctx.Data["PageIsIssueList"] = true
2327
ctx.Data["PageIsLabels"] = true

routers/routes/routes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ func RegisterRoutes(m *macaron.Macaron) {
557557
m.Get("/^:type(issues|pulls)$/:index", repo.ViewIssue)
558558
m.Get("/labels/", repo.RetrieveLabels, repo.Labels)
559559
m.Get("/milestones", repo.Milestones)
560-
}, context.RepoRef(), context.CheckUnit(models.UnitTypeIssues))
560+
}, context.RepoRef())
561561

562562
// m.Get("/branches", repo.Branches)
563563
m.Post("/branches/:name/delete", reqSignIn, reqRepoWriter, repo.MustBeNotBare, repo.DeleteBranchPost)

0 commit comments

Comments
 (0)