mirror of
https://github.com/go-gitea/gitea
synced 2025-07-13 14:07:20 +00:00
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:
committed by
techknowlogick
parent
6dc2f401c9
commit
57a69ef277
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user