Skip to content

Commit ca0ecf1

Browse files
committed
Fix bug
1 parent b155021 commit ca0ecf1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

services/pull/comment.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package pull
55

66
import (
77
"context"
8+
"fmt"
89

910
issues_model "code.gitea.io/gitea/models/issues"
1011
repo_model "code.gitea.io/gitea/models/repo"
@@ -52,6 +53,10 @@ func CreatePushPullComment(ctx context.Context, pusher *user_model.User, pr *iss
5253
return nil, nil
5354
}
5455

56+
if err := pr.LoadIssue(ctx); err != nil {
57+
return nil, fmt.Errorf("unable to load issue for PR[%d]: %w", pr.ID, err)
58+
}
59+
5560
opts := &issues_model.CreateCommentOptions{
5661
Type: issues_model.CommentTypePullRequestPush,
5762
Doer: pusher,

0 commit comments

Comments
 (0)