Skip to content

Commit 02c384c

Browse files
committed
Merge remote-tracking branch 'origin/master' into fix-15075-fix-reference-link-relative-paths
2 parents a67d6ea + 0048d7c commit 02c384c

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

modules/convert/pull_review.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,18 @@ func ToPullReviewCommentList(review *models.Review, doer *models.User) ([]*api.P
8585

8686
apiComments := make([]*api.PullReviewComment, 0, len(review.CodeComments))
8787

88-
auth := false
89-
if doer != nil {
90-
auth = doer.IsAdmin || doer.ID == review.ReviewerID
91-
}
92-
9388
for _, lines := range review.CodeComments {
9489
for _, comments := range lines {
9590
for _, comment := range comments {
91+
auth := false
92+
if doer != nil {
93+
auth = doer.IsAdmin || doer.ID == comment.Poster.ID
94+
}
9695
apiComment := &api.PullReviewComment{
9796
ID: comment.ID,
9897
Body: comment.Content,
99-
Reviewer: ToUser(review.Reviewer, doer != nil, auth),
100-
ReviewID: review.ID,
98+
Reviewer: ToUser(comment.Poster, doer != nil, auth),
99+
ReviewID: comment.PosterID,
101100
Created: comment.CreatedUnix.AsTime(),
102101
Updated: comment.UpdatedUnix.AsTime(),
103102
Path: comment.TreePath,

options/locale/locale_zh-CN.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2549,7 +2549,7 @@ notices.delete_success=系统通知已被删除。
25492549
[action]
25502550
create_repo=创建了仓库 <a href="%s">%s</a>
25512551
rename_repo=重命名仓库 <code>%[1]s</code> 为 <a href="%[2]s">%[3]s</a>
2552-
commit_repo= <a href="%[1]s">%[4]s</a> 推送了代码到 <a href="%[1]s/src/branch/%[2]s">%[3]s</a> 分支
2552+
commit_repo=推送了 <a href="%[1]s/src/branch/%[2]s">%[3]s</a> 分支到 <a href="%[1]s">%[4]s</a>
25532553
create_issue=`创建了工单 <a href="%s/issues/%s">%s#%[2]s</a>`
25542554
close_issue=`关闭了工单 <a href="%s/issues/%s">%s#%[2]s</a>`
25552555
reopen_issue=`重新开启了工单 <a href="%s/issues/%s">%s#%[2]s</a>`
@@ -2560,7 +2560,7 @@ comment_issue=`评论了工单 <a href="%s/issues/%s">%s#%[2]s</a>`
25602560
comment_pull=`评论了合并请求 <a href="%s/pulls/%s">%s#%[2]s</a>`
25612561
merge_pull_request=`合并了合并请求 <a href="%s/pulls/%s">%s#%[2]s</a>`
25622562
transfer_repo=将仓库 <code>%s</code> 转移至 <a href="%s">%s</a>
2563-
push_tag= <a href="%[1]s">%[3]s</a> 推送了标签 <a href="%s/src/tag/%s">%[2]s</a>
2563+
push_tag=推送了标签 <a href="%s/src/tag/%s">%[2]s</a> <a href="%[1]s">%[3]s</a>
25642564
delete_tag=从<a href="%[1]s">%[3]s</a> 删除了标签 %[2]s
25652565
delete_branch=从 <a href="%[1]s">%[3]s</a> 删除分支 %[2]s
25662566
compare_branch=比较

0 commit comments

Comments
 (0)