Skip to content

Commit cc62a93

Browse files
committed
Remove unused router and test
1 parent c58cc46 commit cc62a93

File tree

3 files changed

+0
-9
lines changed

3 files changed

+0
-9
lines changed

routers/web/repo/pull.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -897,10 +897,6 @@ func ViewPullFilesForRange(ctx *context.Context) {
897897
viewPullFiles(ctx, ctx.PathParam("shaFrom"), ctx.PathParam("shaTo"))
898898
}
899899

900-
func ViewPullFilesStartingFromCommit(ctx *context.Context) {
901-
viewPullFiles(ctx, ctx.PathParam("sha"), "")
902-
}
903-
904900
func ViewPullFilesForAllCommitsOfPr(ctx *context.Context) {
905901
viewPullFiles(ctx, "", "")
906902
}

routers/web/web.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1540,7 +1540,6 @@ func registerWebRoutes(m *web.Router) {
15401540
m.Post("/cleanup", context.RepoMustNotBeArchived(), repo.CleanUpPullRequest)
15411541
m.Group("/files", func() {
15421542
m.Get("", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.SetShowOutdatedComments, repo.ViewPullFilesForAllCommitsOfPr)
1543-
m.Get("/{sha:[a-f0-9]{7,40}}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.SetShowOutdatedComments, repo.ViewPullFilesStartingFromCommit)
15441543
m.Get("/{shaFrom:[a-f0-9]{7,40}}..{shaTo:[a-f0-9]{7,40}}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.SetShowOutdatedComments, repo.ViewPullFilesForRange)
15451544
m.Group("/reviews", func() {
15461545
m.Get("/new_comment", repo.RenderNewCodeCommentForm)

tests/integration/pull_diff_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ func TestPullDiff_CommitRangePRDiff(t *testing.T) {
2525
doTestPRDiff(t, "/user2/commitsonpr/pulls/1/files/4ca8bcaf27e28504df7bf996819665986b01c847..23576dd018294e476c06e569b6b0f170d0558705", true, []string{"test2.txt", "test3.txt", "test4.txt"})
2626
}
2727

28-
func TestPullDiff_StartingFromBaseToCommitPRDiff(t *testing.T) {
29-
doTestPRDiff(t, "/user2/commitsonpr/pulls/1/files/c5626fc9eff57eb1bb7b796b01d4d0f2f3f792a2", true, []string{"test1.txt", "test2.txt", "test3.txt"})
30-
}
31-
3228
func doTestPRDiff(t *testing.T, prDiffURL string, reviewBtnDisabled bool, expectedFilenames []string) {
3329
defer tests.PrepareTestEnv(t)()
3430

0 commit comments

Comments
 (0)