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

On merge of already closed PR redirect back to the pulls page #10010

Merged
merged 6 commits into from
Jan 27, 2020
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Apply suggestions from code review
it appears I am too full of cold to code

Co-Authored-By: 6543 <[email protected]>
  • Loading branch information
zeripath and 6543 committed Jan 27, 2020
commit 3a1b7ff290162cce67cf0f917e8580c1c0a94add
4 changes: 2 additions & 2 deletions routers/repo/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -681,11 +681,11 @@ func MergePullRequest(ctx *context.Context, form auth.MergePullRequestForm) {
if issue.IsClosed {
if issue.IsPull {
ctx.Flash.Error(ctx.Tr("repo.pulls.is_closed"))
ctx.Redirect(ctx.Repo.RepoLink + "/issues/" + com.ToStr(issue.Index))
ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + com.ToStr(issue.Index))
return
}
ctx.Flash.Error(ctx.Tr("repo.issues.closed_title"))
ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + com.ToStr(issue.Index))
ctx.Redirect(ctx.Repo.RepoLink + "/issues/" + com.ToStr(issue.Index))
return
}

Expand Down