@@ -1524,7 +1524,10 @@ func registerRoutes(m *web.Router) {
1524
1524
}, context .RepoMustNotBeArchived ())
1525
1525
})
1526
1526
}, repo .MustAllowPulls )
1527
+ }, ignSignIn , context .RepoAssignment , context .RequireRepoReaderOr (unit .TypeCode , unit .TypePullRequests ))
1528
+ // end "/{username}/{reponame}": pull request view/edit
1527
1529
1530
+ m .Group ("/pulls/{index}" , func () {
1528
1531
m .Group ("/media" , func () {
1529
1532
m .Get ("/branch/*" , context .RepoRefByType (context .RepoRefBranch ), repo .SingleDownloadOrLFS )
1530
1533
m .Get ("/tag/*" , context .RepoRefByType (context .RepoRefTag ), repo .SingleDownloadOrLFS )
@@ -1585,7 +1588,7 @@ func registerRoutes(m *web.Router) {
1585
1588
m .Get ("/commit/{sha:([a-f0-9]{7,64})}.{ext:patch|diff}" , repo .MustBeNotEmpty , repo .RawDiff )
1586
1589
m .Post ("/lastcommit/*" , context .RepoRefByType (context .RepoRefCommit ), repo .LastCommit )
1587
1590
}, ignSignIn , context .RepoAssignment , reqRepoCodeReader )
1588
- // end "/{username}/{reponame}": repo code
1591
+ // end "/{username}/{reponame}": pull request code
1589
1592
1590
1593
m .Group ("/{username}/{reponame}" , func () {
1591
1594
m .Get ("/stars" , repo .Stars )
0 commit comments