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
This commit is contained in:
parent
6dc2f401c9
commit
57a69ef277
3 changed files with 15 additions and 8 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue