diff options
author | Giteabot <teabot@gitea.io> | 2024-05-22 10:08:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-22 02:08:05 +0000 |
commit | 2648962ae090e702c809f65d0f1a5b5afa23e990 (patch) | |
tree | ac2ad9f063b0d8eed5f4220d23289c8b8d8236f3 /models | |
parent | e3390e244142a1fa014f985250f8b89b59eca99b (diff) | |
download | gitea-2648962ae090e702c809f65d0f1a5b5afa23e990.tar.gz gitea-2648962ae090e702c809f65d0f1a5b5afa23e990.zip |
Fix automerge will not work because of some events haven't been triggered (#30780) (#31039)
Backport #30780 by @lunny
Replace #25741
Close #24445
Close #30658
Close #20646
~Depends on #30805~
Since #25741 has been rewritten totally, to make the contribution
easier, I will continue the work in this PR. Thanks @6543
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'models')
-rw-r--r-- | models/issues/review.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/issues/review.go b/models/issues/review.go index 3c6934b060..ca6fd6035b 100644 --- a/models/issues/review.go +++ b/models/issues/review.go @@ -155,14 +155,14 @@ func (r *Review) LoadCodeComments(ctx context.Context) (err error) { if r.CodeComments != nil { return err } - if err = r.loadIssue(ctx); err != nil { + if err = r.LoadIssue(ctx); err != nil { return err } r.CodeComments, err = fetchCodeCommentsByReview(ctx, r.Issue, nil, r, false) return err } -func (r *Review) loadIssue(ctx context.Context) (err error) { +func (r *Review) LoadIssue(ctx context.Context) (err error) { if r.Issue != nil { return err } @@ -199,7 +199,7 @@ func (r *Review) LoadReviewerTeam(ctx context.Context) (err error) { // LoadAttributes loads all attributes except CodeComments func (r *Review) LoadAttributes(ctx context.Context) (err error) { - if err = r.loadIssue(ctx); err != nil { + if err = r.LoadIssue(ctx); err != nil { return err } if err = r.LoadCodeComments(ctx); err != nil { |