@@ -1524,7 +1524,10 @@ func registerRoutes(m *web.Router) {
15241524 }, context .RepoMustNotBeArchived ())
15251525 })
15261526 }, repo .MustAllowPulls )
1527+ }, ignSignIn , context .RepoAssignment , context .RequireRepoReaderOr (unit .TypeCode , unit .TypePullRequests ))
1528+ // end "/{username}/{reponame}": pull request view/edit
15271529
1530+ m .Group ("/pulls/{index}" , func () {
15281531 m .Group ("/media" , func () {
15291532 m .Get ("/branch/*" , context .RepoRefByType (context .RepoRefBranch ), repo .SingleDownloadOrLFS )
15301533 m .Get ("/tag/*" , context .RepoRefByType (context .RepoRefTag ), repo .SingleDownloadOrLFS )
@@ -1585,7 +1588,7 @@ func registerRoutes(m *web.Router) {
15851588 m .Get ("/commit/{sha:([a-f0-9]{7,64})}.{ext:patch|diff}" , repo .MustBeNotEmpty , repo .RawDiff )
15861589 m .Post ("/lastcommit/*" , context .RepoRefByType (context .RepoRefCommit ), repo .LastCommit )
15871590 }, ignSignIn , context .RepoAssignment , reqRepoCodeReader )
1588- // end "/{username}/{reponame}": repo code
1591+ // end "/{username}/{reponame}": pull request code
15891592
15901593 m .Group ("/{username}/{reponame}" , func () {
15911594 m .Get ("/stars" , repo .Stars )
0 commit comments