Refactor pull request view (2) (#37428)

Follow up #37380

Some code is moved to the place whether it should be.
This commit is contained in:
wxiaoguang
2026-04-26 21:58:48 +08:00
committed by GitHub
parent 712b3a54b5
commit b3ed4cde9a
4 changed files with 84 additions and 99 deletions

View File

@@ -908,8 +908,8 @@ func MarkConversation(ctx context.Context, comment *Comment, doer *user_model.Us
// CanMarkConversation Add or remove Conversation mark for a code comment permission check
// the PR writer , official reviewer and poster can do it
func CanMarkConversation(ctx context.Context, issue *Issue, doer *user_model.User) (permResult bool, err error) {
if doer == nil || issue == nil {
return false, errors.New("issue or doer is nil")
if doer == nil {
return false, nil
}
if err = issue.LoadRepo(ctx); err != nil {