@@ -774,7 +774,8 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error {
774774 // get pr
775775 pr , ok := g .prCache [issueID ]
776776 if ! ok {
777- pr , err := models .GetPullRequestByID (issueID )
777+ var err error
778+ pr , err = models .GetPullRequestByIssueID (issueID )
778779 if err != nil {
779780 return err
780781 }
@@ -794,14 +795,16 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error {
794795 patch := gitdiff .CutDiffAroundLine (patchBuf , int64 ((& models.Comment {Line : line }).UnsignedLine ()), line < 0 , setting .UI .CodeCommentLines )
795796
796797 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 ()),
805808 }
806809
807810 if userid > 0 {
0 commit comments