Skip to content

Commit 2a4a5fc

Browse files
committed
Add alert template and redirect to diff page on review failure
1 parent 9f86967 commit 2a4a5fc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

routers/repo/pull_review.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func SubmitReview(ctx *context.Context, form auth.SubmitReviewForm) {
123123
}
124124

125125
ctx.Flash.Error(translated)
126-
ctx.Redirect(fmt.Sprintf("%s/pulls/%d", ctx.Repo.RepoLink, issue.Index))
126+
ctx.Redirect(fmt.Sprintf("%s/pulls/%d/files", ctx.Repo.RepoLink, issue.Index))
127127
return
128128
}
129129
}

templates/repo/pulls/files.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<div class="ui divider"></div>
1212
{{template "repo/issue/view_title" .}}
1313
{{template "repo/pulls/tab_menu" .}}
14+
{{template "base/alert" .}}
1415
<div class="ui bottom attached tab pull segment active">
1516
{{template "repo/diff/box" .}}
1617
</div>

0 commit comments

Comments
 (0)