@@ -774,7 +774,8 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error {
774
774
// get pr
775
775
pr , ok := g .prCache [issueID ]
776
776
if ! ok {
777
- pr , err := models .GetPullRequestByID (issueID )
777
+ var err error
778
+ pr , err = models .GetPullRequestByIssueID (issueID )
778
779
if err != nil {
779
780
return err
780
781
}
@@ -794,14 +795,16 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error {
794
795
patch := gitdiff .CutDiffAroundLine (patchBuf , int64 ((& models.Comment {Line : line }).UnsignedLine ()), line < 0 , setting .UI .CodeCommentLines )
795
796
796
797
var c = models.Comment {
797
- Type : models .CommentTypeCode ,
798
- PosterID : comment .PosterID ,
799
- IssueID : issueID ,
800
- Content : comment .Content ,
801
- Line : line ,
802
- TreePath : comment .TreePath ,
803
- CommitSHA : comment .CommitID ,
804
- Patch : patch ,
798
+ Type : models .CommentTypeCode ,
799
+ PosterID : comment .PosterID ,
800
+ IssueID : issueID ,
801
+ Content : comment .Content ,
802
+ Line : line ,
803
+ TreePath : comment .TreePath ,
804
+ CommitSHA : comment .CommitID ,
805
+ Patch : patch ,
806
+ CreatedUnix : timeutil .TimeStamp (comment .CreatedAt .Unix ()),
807
+ UpdatedUnix : timeutil .TimeStamp (comment .UpdatedAt .Unix ()),
805
808
}
806
809
807
810
if userid > 0 {
0 commit comments