summaryrefslogtreecommitdiffstats
path: root/routers/routes
diff options
context:
space:
mode:
authorLanre Adelowo <adelowomailbox@gmail.com>2019-01-30 18:20:40 +0100
committertechknowlogick <matti@mdranta.net>2019-01-30 12:20:40 -0500
commit57a69ef277546414893a38feb70412aa4c32330e (patch)
treed20a4d5e787054600b0d21dee2a9e554b0007c32 /routers/routes
parent6dc2f401c9d4d07ca672d4f3a304799e70364f1b (diff)
downloadgitea-57a69ef277546414893a38feb70412aa4c32330e.tar.gz
gitea-57a69ef277546414893a38feb70412aa4c32330e.zip
don't allow pull requests to be created on an archived repository (#5883)
* don't allow pull requests to be created on an archived repository Also disable the "PR" button if the repo is archived * Refuse creating an issue/PR via API calls too
Diffstat (limited to 'routers/routes')
-rw-r--r--routers/routes/routes.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/routes/routes.go b/routers/routes/routes.go
index 41f38801c8..c6b7a097ea 100644
--- a/routers/routes/routes.go
+++ b/routers/routes/routes.go
@@ -586,7 +586,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/milestone", func() {
m.Get("/:id", repo.MilestoneIssuesAndPulls)
}, reqRepoIssuesOrPullsWriter, context.RepoRef())
- m.Combo("/compare/*", reqRepoCodeReader, reqRepoPullsReader, repo.MustAllowPulls, repo.SetEditorconfigIfExists).
+ m.Combo("/compare/*", context.RepoMustNotBeArchived(), reqRepoCodeReader, reqRepoPullsReader, repo.MustAllowPulls, repo.SetEditorconfigIfExists).
Get(repo.SetDiffViewStyle, repo.CompareAndPullRequest).
Post(bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost)