Fix panic when comment is nil (#34257)
Some checks failed
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled

Fix #34254
This commit is contained in:
Lunny Xiao
2025-04-23 18:58:00 -07:00
committed by GitHub
parent e625250ffc
commit e73c1139ac
3 changed files with 10 additions and 22 deletions

View File

@@ -664,7 +664,7 @@ func AddReviewRequest(ctx context.Context, issue *Issue, reviewer, doer *user_mo
}
if review != nil {
// skip it when reviewer hase been request to review
// skip it when reviewer has been request to review
if review.Type == ReviewTypeRequest {
return nil, committer.Commit() // still commit the transaction, or committer.Close() will rollback it, even if it's a reused transaction.
}