Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add commits dropdown in PR files view and allow commit by commit review #25528

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
acbd8dd
Add commits dropdown in PR files view
sebastian-sauer Jun 26, 2023
bd1551c
Disable File-Viewed when reviewing a single commit
sebastian-sauer Jun 26, 2023
862ffc8
Add ellipsis and divider
sebastian-sauer Jun 26, 2023
836ee9b
Add styles and ellipsis
sebastian-sauer Jun 26, 2023
77a81bb
Add max-height and scroll for list of commits
sebastian-sauer Jun 28, 2023
45b7567
Update web_src/css/repo.css
silverwind Jun 28, 2023
a763afe
Reduce padding of commit-menu
sebastian-sauer Jun 28, 2023
a63c7b9
ui enhancements
silverwind Jun 28, 2023
eaa02c7
add jump class to correctly hide tippy
silverwind Jun 28, 2023
bfab42b
tweak locale
silverwind Jun 28, 2023
b390786
remove unnecessary display
silverwind Jun 28, 2023
d439c1f
reduce height some more for small screens
silverwind Jun 28, 2023
2f275a6
calculate len only once
silverwind Jun 28, 2023
9653f1a
Check if given commit sha exists on this PR
sebastian-sauer Jun 28, 2023
7049c71
Improve code
sebastian-sauer Jul 3, 2023
f45980b
Merge remote-tracking branch 'origin/main' into feature/allow_review_…
sebastian-sauer Jul 3, 2023
5b8b4cb
Support three github urls
sebastian-sauer Jul 3, 2023
971d0a0
Make uris behave like github
sebastian-sauer Jul 3, 2023
059c55b
Make commit selector a vue component
sebastian-sauer Jul 3, 2023
1991bf8
Merge remote-tracking branch 'origin/main' into feature/allow_review_…
sebastian-sauer Jul 4, 2023
4d1a4bf
Improve var naming and add comments
sebastian-sauer Jul 4, 2023
451f644
Fix displayed commit for single commits
sebastian-sauer Jul 4, 2023
2d4accf
Disable submitting review when not viewing the full diff
sebastian-sauer Jul 4, 2023
c60b78f
Merge remote-tracking branch 'origin/main' into feature/allow_review_…
sebastian-sauer Jul 4, 2023
0e105bb
Add integration tests for different PR diff endpoints
sebastian-sauer Jul 4, 2023
563d371
fix fmt
sebastian-sauer Jul 5, 2023
0328434
Merge branch 'main' into feature/allow_review_commit_by_commit
sebastian-sauer Jul 5, 2023
6d6d846
Merge remote-tracking branch 'origin/main' into feature/allow_review_…
sebastian-sauer Jul 6, 2023
8588935
Add integration test with more commits
sebastian-sauer Jul 6, 2023
36f3af2
Remove button loading artifacts until vue component is loaded
sebastian-sauer Jul 6, 2023
91217eb
Add comment explaining why the svg is available
sebastian-sauer Jul 6, 2023
43a8a15
Fix integration tests
sebastian-sauer Jul 6, 2023
6828bfd
Add "Show changes since your last review" functionality
sebastian-sauer Jul 6, 2023
863edf6
Add missing divider
sebastian-sauer Jul 6, 2023
076c5ee
Merge remote-tracking branch 'origin/main' into feature/allow_review_…
sebastian-sauer Jul 6, 2023
ea83620
Fix lint
sebastian-sauer Jul 6, 2023
2b37ae4
Fix more tests
sebastian-sauer Jul 6, 2023
1824329
Fix fixture
sebastian-sauer Jul 6, 2023
9dde031
Merge branch 'main' into feature/allow_review_commit_by_commit
sebastian-sauer Jul 7, 2023
ad226d7
Update web_src/js/components/DiffCommitSelector.vue
silverwind Jul 7, 2023
60e1e53
Fix ci error
sebastian-sauer Jul 7, 2023
9a3fe9c
lowercase json keys
sebastian-sauer Jul 7, 2023
5cf8473
Merge branch 'feature/allow_review_commit_by_commit' of https://githu…
sebastian-sauer Jul 7, 2023
1590ad5
Use frontend fetch to get the data
sebastian-sauer Jul 7, 2023
d2b065a
Fix changes since last review url
sebastian-sauer Jul 7, 2023
109394c
Fix order of commits
sebastian-sauer Jul 7, 2023
bcb7c09
Refactors and add hint for commit range
sebastian-sauer Jul 9, 2023
429e41f
Add missing translation
sebastian-sauer Jul 9, 2023
0aef59c
Merge remote-tracking branch 'origin/main' into feature/allow_review_…
sebastian-sauer Jul 9, 2023
5fc1492
Merge branch 'main' into feature/allow_review_commit_by_commit
sebastian-sauer Jul 11, 2023
08094a0
Apply suggestions from code review
sebastian-sauer Jul 11, 2023
333ae56
Merge remote-tracking branch 'origin/main' into feature/allow_review_…
sebastian-sauer Jul 11, 2023
ec0f21c
Add loading animation
sebastian-sauer Jul 12, 2023
ba32e3d
Merge branch 'main' into feature/allow_review_commit_by_commit
silverwind Jul 12, 2023
fea2a66
Use ShortSha for UI
sebastian-sauer Jul 12, 2023
7518ec1
Add max-width and fix double border-top
sebastian-sauer Jul 12, 2023
91a6d0d
Merge branch 'feature/allow_review_commit_by_commit' of https://githu…
sebastian-sauer Jul 12, 2023
f3895a1
Merge branch 'main' into feature/allow_review_commit_by_commit
silverwind Jul 13, 2023
bbf9676
css tweaks
silverwind Jul 13, 2023
dcbdb2e
Fix committer display in vue component
sebastian-sauer Jul 14, 2023
34c9154
Merge branch 'main' into feature/allow_review_commit_by_commit
sebastian-sauer Jul 17, 2023
8307701
Merge remote-tracking branch 'origin/main' into feature/allow_review_…
sebastian-sauer Jul 18, 2023
8a7c4a1
Merge branch 'feature/allow_review_commit_by_commit' of https://githu…
sebastian-sauer Jul 18, 2023
fe0e4c9
Merge remote-tracking branch 'origin/main' into feature/allow_review_…
sebastian-sauer Jul 25, 2023
e005ee3
Fix case of PR
sebastian-sauer Jul 25, 2023
243ade4
Remove div selector
sebastian-sauer Jul 25, 2023
1018cfd
Improve check for empty last review commit ha
sebastian-sauer Jul 25, 2023
78b1006
Improve check for empty commit sha
sebastian-sauer Jul 25, 2023
21f9407
Improve routes
sebastian-sauer Jul 25, 2023
92e9a47
Show all changes in PR if all commits are selected
sebastian-sauer Jul 25, 2023
feba85a
Fix opening the popup when pressing enter
sebastian-sauer Jul 25, 2023
754d242
Extract logic to services
sebastian-sauer Jul 25, 2023
bf424e3
Fix lint
sebastian-sauer Jul 25, 2023
c57289e
Fix relative-time in Firefox
sebastian-sauer Jul 26, 2023
9d025f4
Use light color for show all commits message
sebastian-sauer Jul 26, 2023
2d6c974
Disable Changes since last review if no new commits are available
sebastian-sauer Jul 26, 2023
359a3df
Merge remote-tracking branch 'origin/main' into feature/allow_review_…
sebastian-sauer Jul 27, 2023
985d9de
Make dropdown usable with keyboard
sebastian-sauer Jul 27, 2023
1724181
Add "Show All commits" link
sebastian-sauer Jul 27, 2023
f7acf4a
Add improved range selection
sebastian-sauer Jul 27, 2023
3f9749f
fix XORM bug
wxiaoguang Jul 28, 2023
5e3df0e
fine tune
wxiaoguang Jul 28, 2023
e352233
fine tune
wxiaoguang Jul 28, 2023
57f4864
refactor dom event listener
wxiaoguang Jul 28, 2023
39b4d0c
Merge branch 'main' into feature/allow_review_commit_by_commit
GiteaBot Jul 28, 2023
59588a5
Merge branch 'main' into feature/allow_review_commit_by_commit
GiteaBot Jul 28, 2023
275750e
Merge branch 'main' into feature/allow_review_commit_by_commit
delvh Jul 28, 2023
f4438d1
Fix indentation
sebastian-sauer Jul 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions models/fixtures/issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,20 @@
created_unix: 946684830
updated_unix: 978307200
is_locked: false

-
id: 19
repo_id: 58
index: 1
poster_id: 2
original_author_id: 0
name: issue for pr
content: content
milestone_id: 0
priority: 0
is_closed: false
is_pull: true
num_comments: 0
created_unix: 946684830
updated_unix: 978307200
is_locked: false
13 changes: 13 additions & 0 deletions models/fixtures/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,16 @@
base_branch: master
merge_base: 2a47ca4b614a9f5a
has_merged: false

-
id: 7
type: 0 # gitea pull request
status: 2 # mergable
issue_id: 19
index: 1
head_repo_id: 58
base_repo_id: 58
head_branch: branch1
base_branch: main
merge_base: cbff181af4c9c7fee3cf6c106699e07d9a3f54e6
has_merged: false
30 changes: 30 additions & 0 deletions models/fixtures/repo_unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -607,3 +607,33 @@
repo_id: 52
type: 1
created_unix: 946684810

-
id: 91
repo_id: 58
type: 1
created_unix: 946684810

-
id: 92
repo_id: 58
type: 2
created_unix: 946684810

-
id: 93
repo_id: 58
type: 3
created_unix: 946684810

-
id: 94
repo_id: 58
type: 4
created_unix: 946684810

-
id: 95
repo_id: 58
type: 5
created_unix: 946684810
31 changes: 31 additions & 0 deletions models/fixtures/repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1662,3 +1662,34 @@
is_private: false
status: 0
num_issues: 0

-
id: 58 # org public repo
owner_id: 2
owner_name: user2
lower_name: commitsonpr
name: commitsonpr
default_branch: main
num_watches: 0
num_stars: 0
num_forks: 0
num_issues: 0
num_closed_issues: 0
num_pulls: 1
num_closed_pulls: 0
num_milestones: 0
num_closed_milestones: 0
num_projects: 0
num_closed_projects: 0
is_private: false
is_empty: false
is_archived: false
is_mirror: false
status: 0
is_fork: false
fork_id: 0
is_template: false
template_id: 0
size: 0
is_fsck_enabled: true
close_issues_via_commit_in_any_branch: false
2 changes: 1 addition & 1 deletion models/fixtures/user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
num_followers: 2
num_following: 1
num_stars: 2
num_repos: 13
num_repos: 14
num_teams: 0
num_members: 0
visibility: 0
Expand Down
2 changes: 1 addition & 1 deletion models/issues/issue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ func TestCountIssues(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
count, err := issues_model.CountIssues(db.DefaultContext, &issues_model.IssuesOptions{})
assert.NoError(t, err)
assert.EqualValues(t, 18, count)
assert.EqualValues(t, 19, count)
}

func TestIssueLoadAttributes(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion models/issues/review_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func FindLatestReviews(ctx context.Context, opts FindReviewOptions) (ReviewList,
}

sess.In("id", builder.
Select("max ( id ) ").
Select("max(id)").
From("review").
Where(cond).
GroupBy("reviewer_id"))
Expand Down
6 changes: 3 additions & 3 deletions models/repo/repo_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,12 @@ func TestSearchRepository(t *testing.T) {
{
name: "AllPublic/PublicRepositoriesOfUserIncludingCollaborative",
opts: &repo_model.SearchRepoOptions{ListOptions: db.ListOptions{Page: 1, PageSize: 10}, OwnerID: 15, AllPublic: true, Template: util.OptionalBoolFalse},
count: 30,
count: 31,
},
{
name: "AllPublic/PublicAndPrivateRepositoriesOfUserIncludingCollaborative",
opts: &repo_model.SearchRepoOptions{ListOptions: db.ListOptions{Page: 1, PageSize: 10}, OwnerID: 15, Private: true, AllPublic: true, AllLimited: true, Template: util.OptionalBoolFalse},
count: 35,
count: 36,
},
{
name: "AllPublic/PublicAndPrivateRepositoriesOfUserIncludingCollaborativeByName",
Expand All @@ -255,7 +255,7 @@ func TestSearchRepository(t *testing.T) {
{
name: "AllPublic/PublicRepositoriesOfOrganization",
opts: &repo_model.SearchRepoOptions{ListOptions: db.ListOptions{Page: 1, PageSize: 10}, OwnerID: 17, AllPublic: true, Collaborate: util.OptionalBoolFalse, Template: util.OptionalBoolFalse},
count: 30,
count: 31,
},
{
name: "AllTemplates",
Expand Down
7 changes: 7 additions & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1662,6 +1662,13 @@ pulls.switch_comparison_type = Switch comparison type
pulls.switch_head_and_base = Switch head and base
pulls.filter_branch = Filter branch
pulls.no_results = No results found.
pulls.show_all_commits = Show all commits
pulls.show_changes_since_your_last_review = Show changes since your last review
pulls.showing_only_single_commit = Showing only changes of commit %[1]s
pulls.showing_specified_commit_range = Showing only changes between %[1]s..%[2]s
sebastian-sauer marked this conversation as resolved.
Show resolved Hide resolved
pulls.select_commit_hold_shift_for_range = Select commit. Hold shift + click to select a range
pulls.review_only_possible_for_full_diff = Review is only possible when viewing the full diff
pulls.filter_changes_by_commit = Filter by commit
pulls.nothing_to_compare = These branches are equal. There is no need to create a pull request.
pulls.nothing_to_compare_and_allow_empty_pr = These branches are equal. This PR will be empty.
pulls.has_pull_request = `A pull request between these branches already exists: <a href="%[1]s">%[2]s#%[3]d</a>`
Expand Down
116 changes: 111 additions & 5 deletions routers/web/repo/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,42 @@ func PrepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *git.C
return compareInfo
}

type pullCommitList struct {
Commits []pull_service.CommitInfo `json:"commits"`
LastReviewCommitSha string `json:"last_review_commit_sha"`
Locale map[string]string `json:"locale"`
}

// GetPullCommits get all commits for given pull request
func GetPullCommits(ctx *context.Context) {
issue := checkPullInfo(ctx)
if ctx.Written() {
return
}
resp := &pullCommitList{}

commits, lastReviewCommitSha, err := pull_service.GetPullCommits(ctx, issue)
if err != nil {
ctx.JSON(http.StatusInternalServerError, err)
return
}

// Get the needed locale
resp.Locale = map[string]string{
"lang": ctx.Locale.Language(),
"filter_changes_by_commit": ctx.Tr("repo.pulls.filter_changes_by_commit"),
"show_all_commits": ctx.Tr("repo.pulls.show_all_commits"),
"stats_num_commits": ctx.TrN(len(commits), "repo.activity.git_stats_commit_1", "repo.activity.git_stats_commit_n", len(commits)),
"show_changes_since_your_last_review": ctx.Tr("repo.pulls.show_changes_since_your_last_review"),
"select_commit_hold_shift_for_range": ctx.Tr("repo.pulls.select_commit_hold_shift_for_range"),
}

resp.Commits = commits
resp.LastReviewCommitSha = lastReviewCommitSha

ctx.JSON(http.StatusOK, resp)
}

// ViewPullCommits show commits for a pull request
func ViewPullCommits(ctx *context.Context) {
ctx.Data["PageIsPullList"] = true
Expand Down Expand Up @@ -739,7 +775,7 @@ func ViewPullCommits(ctx *context.Context) {
}

// ViewPullFiles render pull request changed files list page
func ViewPullFiles(ctx *context.Context) {
func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommit string, willShowSpecifiedCommitRange, willShowSpecifiedCommit bool) {
ctx.Data["PageIsPullList"] = true
ctx.Data["PageIsPullFiles"] = true

Expand All @@ -762,6 +798,33 @@ func ViewPullFiles(ctx *context.Context) {
prInfo = PrepareViewPullInfo(ctx, issue)
}

// Validate the given commit sha to show (if any passed)
if willShowSpecifiedCommit || willShowSpecifiedCommitRange {

foundStartCommit := len(specifiedStartCommit) == 0
foundEndCommit := len(specifiedEndCommit) == 0

if !(foundStartCommit && foundEndCommit) {
for _, commit := range prInfo.Commits {
if commit.ID.String() == specifiedStartCommit {
foundStartCommit = true
}
if commit.ID.String() == specifiedEndCommit {
foundEndCommit = true
}

if foundStartCommit && foundEndCommit {
break
}
}
}

if !(foundStartCommit && foundEndCommit) {
ctx.NotFound("Given SHA1 not found for this PR", nil)
return
}
}

if ctx.Written() {
return
} else if prInfo == nil {
Expand All @@ -775,12 +838,30 @@ func ViewPullFiles(ctx *context.Context) {
return
}

startCommitID = prInfo.MergeBase
endCommitID = headCommitID
ctx.Data["IsShowingOnlySingleCommit"] = willShowSpecifiedCommit

if willShowSpecifiedCommit || willShowSpecifiedCommitRange {
if len(specifiedEndCommit) > 0 {
endCommitID = specifiedEndCommit
} else {
endCommitID = headCommitID
}
if len(specifiedStartCommit) > 0 {
startCommitID = specifiedStartCommit
} else {
startCommitID = prInfo.MergeBase
}
ctx.Data["IsShowingAllCommits"] = false
} else {
endCommitID = headCommitID
startCommitID = prInfo.MergeBase
ctx.Data["IsShowingAllCommits"] = true
}

ctx.Data["Username"] = ctx.Repo.Owner.Name
ctx.Data["Reponame"] = ctx.Repo.Repository.Name
ctx.Data["AfterCommitID"] = endCommitID
ctx.Data["BeforeCommitID"] = startCommitID

fileOnly := ctx.FormBool("file-only")

Expand All @@ -789,8 +870,8 @@ func ViewPullFiles(ctx *context.Context) {
if fileOnly && (len(files) == 2 || len(files) == 1) {
maxLines, maxFiles = -1, -1
}

diffOptions := &gitdiff.DiffOptions{
BeforeCommitID: startCommitID,
AfterCommitID: endCommitID,
SkipTo: ctx.FormString("skip-to"),
MaxLines: maxLines,
Expand All @@ -799,9 +880,18 @@ func ViewPullFiles(ctx *context.Context) {
WhitespaceBehavior: gitdiff.GetWhitespaceFlag(ctx.Data["WhitespaceBehavior"].(string)),
}

if !willShowSpecifiedCommit {
diffOptions.BeforeCommitID = startCommitID
}

var methodWithError string
var diff *gitdiff.Diff
if !ctx.IsSigned {

// if we're not logged in or only a single commit (or commit range) is shown we
// have to load only the diff and not get the viewed information
// as the viewed information is designed to be loaded only on latest PR
// diff and if you're signed in.
if !ctx.IsSigned || willShowSpecifiedCommit || willShowSpecifiedCommitRange {
diff, err = gitdiff.GetDiff(gitRepo, diffOptions, files...)
methodWithError = "GetDiff"
} else {
Expand Down Expand Up @@ -908,6 +998,22 @@ func ViewPullFiles(ctx *context.Context) {
ctx.HTML(http.StatusOK, tplPullFiles)
}

func ViewPullFilesForSingleCommit(ctx *context.Context) {
viewPullFiles(ctx, "", ctx.Params("sha"), true, true)
}

func ViewPullFilesForRange(ctx *context.Context) {
viewPullFiles(ctx, ctx.Params("shaFrom"), ctx.Params("shaTo"), true, false)
}

func ViewPullFilesStartingFromCommit(ctx *context.Context) {
viewPullFiles(ctx, "", ctx.Params("sha"), true, false)
}

func ViewPullFilesForAllCommitsOfPr(ctx *context.Context) {
viewPullFiles(ctx, "", "", false, false)
}

// UpdatePullRequest merge PR's baseBranch into headBranch
func UpdatePullRequest(ctx *context.Context) {
issue := checkPullInfo(ctx)
Expand Down
2 changes: 1 addition & 1 deletion routers/web/user/home_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestPulls(t *testing.T) {
Pulls(ctx)
assert.EqualValues(t, http.StatusOK, ctx.Resp.Status())

assert.Len(t, ctx.Data["Issues"], 4)
assert.Len(t, ctx.Data["Issues"], 5)
}

func TestMilestones(t *testing.T) {
Expand Down
10 changes: 8 additions & 2 deletions routers/web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -1279,14 +1279,20 @@ func registerRoutes(m *web.Route) {
m.Get("", repo.SetWhitespaceBehavior, repo.GetPullDiffStats, repo.ViewIssue)
m.Get(".diff", repo.DownloadPullDiff)
m.Get(".patch", repo.DownloadPullPatch)
m.Get("/commits", context.RepoRef(), repo.SetWhitespaceBehavior, repo.GetPullDiffStats, repo.ViewPullCommits)
m.Group("/commits", func() {
m.Get("", context.RepoRef(), repo.SetWhitespaceBehavior, repo.GetPullDiffStats, repo.ViewPullCommits)
m.Get("/list", context.RepoRef(), repo.GetPullCommits)
m.Get("/{sha:[a-f0-9]{7,40}}", context.RepoRef(), repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.SetShowOutdatedComments, repo.ViewPullFilesForSingleCommit)
})
m.Post("/merge", context.RepoMustNotBeArchived(), web.Bind(forms.MergePullRequestForm{}), repo.MergePullRequest)
m.Post("/cancel_auto_merge", context.RepoMustNotBeArchived(), repo.CancelAutoMergePullRequest)
m.Post("/update", repo.UpdatePullRequest)
m.Post("/set_allow_maintainer_edit", web.Bind(forms.UpdateAllowEditsForm{}), repo.SetAllowEdits)
m.Post("/cleanup", context.RepoMustNotBeArchived(), context.RepoRef(), repo.CleanUpPullRequest)
m.Group("/files", func() {
m.Get("", context.RepoRef(), repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.SetShowOutdatedComments, repo.ViewPullFiles)
m.Get("", context.RepoRef(), repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.SetShowOutdatedComments, repo.ViewPullFilesForAllCommitsOfPr)
m.Get("/{sha:[a-f0-9]{7,40}}", context.RepoRef(), repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.SetShowOutdatedComments, repo.ViewPullFilesStartingFromCommit)
m.Get("/{shaFrom:[a-f0-9]{7,40}}..{shaTo:[a-f0-9]{7,40}}", context.RepoRef(), repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.SetShowOutdatedComments, repo.ViewPullFilesForRange)
m.Group("/reviews", func() {
m.Get("/new_comment", repo.RenderNewCodeCommentForm)
m.Post("/comments", web.Bind(forms.CodeCommentForm{}), repo.SetShowOutdatedComments, repo.CreateCodeComment)
Expand Down
Loading