forked from forgejo/forgejo
Fix missing updated time on migrated issues and comments (#9744)
* Fix missing updated time on migrated issues and comments * Fix testing and missing updated on migrating pullrequest Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
This commit is contained in:
parent
2677d071f9
commit
7f869c061e
6 changed files with 15 additions and 0 deletions
|
@ -334,6 +334,7 @@ func (g *GiteaLocalUploader) CreateIssues(issues ...*base.Issue) error {
|
|||
MilestoneID: milestoneID,
|
||||
Labels: labels,
|
||||
CreatedUnix: timeutil.TimeStamp(issue.Created.Unix()),
|
||||
UpdatedUnix: timeutil.TimeStamp(issue.Updated.Unix()),
|
||||
}
|
||||
|
||||
userid, ok := g.userMap[issue.PosterID]
|
||||
|
@ -408,6 +409,7 @@ func (g *GiteaLocalUploader) CreateComments(comments ...*base.Comment) error {
|
|||
Type: models.CommentTypeComment,
|
||||
Content: comment.Content,
|
||||
CreatedUnix: timeutil.TimeStamp(comment.Created.Unix()),
|
||||
UpdatedUnix: timeutil.TimeStamp(comment.Updated.Unix()),
|
||||
}
|
||||
|
||||
if userid > 0 {
|
||||
|
@ -576,6 +578,7 @@ func (g *GiteaLocalUploader) newPullRequest(pr *base.PullRequest) (*models.PullR
|
|||
IsLocked: pr.IsLocked,
|
||||
Labels: labels,
|
||||
CreatedUnix: timeutil.TimeStamp(pr.Created.Unix()),
|
||||
UpdatedUnix: timeutil.TimeStamp(pr.Updated.Unix()),
|
||||
}
|
||||
|
||||
userid, ok := g.userMap[pr.PosterID]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue