@@ -71,7 +71,7 @@ func InvalidateCodeComments(ctx context.Context, prs issues_model.PullRequestLis
7171}
7272
7373// CreateCodeComment creates a comment on the code line
74- func CreateCodeComment (ctx context.Context , doer * user_model.User , gitRepo * git.Repository , issue * issues_model.Issue , line int64 , content , treePath string , isReview bool , replyReviewID int64 , latestCommitID string ) (* issues_model.Comment , error ) {
74+ func CreateCodeComment (ctx context.Context , doer * user_model.User , gitRepo * git.Repository , issue * issues_model.Issue , line int64 , content , treePath string , pendingReview bool , replyReviewID int64 , latestCommitID string ) (* issues_model.Comment , error ) {
7575 var (
7676 existsReview bool
7777 err error
@@ -82,7 +82,7 @@ func CreateCodeComment(ctx context.Context, doer *user_model.User, gitRepo *git.
8282 // - Comments that are part of a review
8383 // - Comments that reply to an existing review
8484
85- if ! isReview && replyReviewID != 0 {
85+ if ! pendingReview && replyReviewID != 0 {
8686 // It's not part of a review; maybe a reply to a review comment or a single comment.
8787 // Check if there are reviews for that line already; if there are, this is a reply
8888 if existsReview , err = issues_model .ReviewExists (issue , treePath , line ); err != nil {
@@ -91,7 +91,7 @@ func CreateCodeComment(ctx context.Context, doer *user_model.User, gitRepo *git.
9191 }
9292
9393 // Comments that are replies don't require a review header to show up in the issue view
94- if ! isReview && existsReview {
94+ if ! pendingReview && existsReview {
9595 if err = issue .LoadRepo (ctx ); err != nil {
9696 return nil , err
9797 }
@@ -149,7 +149,7 @@ func CreateCodeComment(ctx context.Context, doer *user_model.User, gitRepo *git.
149149 return nil , err
150150 }
151151
152- if ! isReview && ! existsReview {
152+ if ! pendingReview && ! existsReview {
153153 // Submit the review we've just created so the comment shows up in the issue view
154154 if _ , _ , err = SubmitReview (ctx , doer , gitRepo , issue , issues_model .ReviewTypeComment , "" , latestCommitID , nil ); err != nil {
155155 return nil , err
0 commit comments