Skip to content

Commit 40b1ad3

Browse files
committed
improvements
1 parent 0434311 commit 40b1ad3

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

options/locale/locale_en-US.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1630,6 +1630,8 @@ issues.reopen_comment_issue = Reopen with Comment
16301630
issues.create_comment = Comment
16311631
issues.comment.blocked_user = Cannot create or edit comment because you are blocked by the poster or repository owner.
16321632
issues.not_closed = The issue is not closed.
1633+
issues.reopen_not_allowed = No permission to reopen this issue.
1634+
issues.reopen_not_allowed_merged = A pull request cannot be reopened after it has been merged.
16331635
issues.comment.empty_content = The comment content cannot be empty.
16341636
issues.already_closed = The issue is already closed.
16351637
issues.closed_at = `closed this issue <a id="%[1]s" href="#%[1]s">%[2]s</a>`
@@ -1952,7 +1954,7 @@ pulls.has_merged = Failed: The pull request has been merged. You cannot merge ag
19521954
pulls.push_rejected = Push Failed: The push was rejected. Review the Git Hooks for this repository.
19531955
pulls.push_rejected_summary = Full Rejection Message
19541956
pulls.push_rejected_no_message = Push Failed: The push was rejected but there was no remote message. Review the Git Hooks for this repository.
1955-
pulls.open_unmerged_pull_exists = `You cannot perform a reopen operation because there is a pending pull request (#%d) with identical properties.`
1957+
pulls.open_unmerged_pull_exists = You cannot perform a reopen operation because there is a pending pull request (#%d) with identical properties.
19561958
pulls.status_checking = Some checks are pending
19571959
pulls.status_checks_success = All checks were successful
19581960
pulls.status_checks_warning = Some checks reported warnings

routers/web/repo/issue_comment.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func NewComment(ctx *context.Context) {
102102
pr, err := issues_model.GetUnmergedPullRequest(ctx, pull.HeadRepoID, pull.BaseRepoID, pull.HeadBranch, pull.BaseBranch, pull.Flow)
103103
if err != nil {
104104
if !issues_model.IsErrPullRequestNotExist(err) {
105-
ctx.JSONError(ctx.Tr("repo.issues.dependency.pr_close_blocked"))
105+
ctx.JSONError(err.Error())
106106
return
107107
}
108108
}
@@ -121,10 +121,6 @@ func NewComment(ctx *context.Context) {
121121
return
122122
}
123123

124-
// Regenerate patch and test conflict.
125-
pull.HeadCommitID = ""
126-
pull_service.StartPullRequestCheckImmediately(ctx, pull)
127-
128124
// check whether the ref of PR <refs/pulls/pr_index/head> in base repo is consistent with the head commit of head branch in the head repo
129125
// get head commit of PR
130126
if pull.Flow == issues_model.PullRequestFlowGithub {
@@ -176,6 +172,10 @@ func NewComment(ctx *context.Context) {
176172
}
177173
}
178174
}
175+
176+
// Regenerate patch and test conflict.
177+
pull.HeadCommitID = ""
178+
pull_service.StartPullRequestCheckImmediately(ctx, pull)
179179
case "close":
180180
if issue.IsClosed {
181181
ctx.JSONError(ctx.Tr("repo.issues.already_closed"))

0 commit comments

Comments
 (0)