From 422c30d3157d9f06af43901a1c7978dd25ca12a5 Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Wed, 18 Aug 2021 02:47:18 +0200 Subject: Refactored and fixed migration tests. (#16714) Co-authored-by: techknowlogick --- modules/migrations/gogs.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modules/migrations/gogs.go') diff --git a/modules/migrations/gogs.go b/modules/migrations/gogs.go index 9e663fd1fe..388020c88a 100644 --- a/modules/migrations/gogs.go +++ b/modules/migrations/gogs.go @@ -146,16 +146,12 @@ func (g *GogsDownloader) GetMilestones() ([]*base.Milestone, error) { return nil, err } - t := time.Now() - for _, m := range ms { milestones = append(milestones, &base.Milestone{ Title: m.Title, Description: m.Description, Deadline: m.Deadline, State: string(m.State), - Created: t, - Updated: &t, Closed: m.Closed, }) } @@ -294,12 +290,14 @@ func convertGogsIssue(issue *gogs.Issue) *base.Issue { return &base.Issue{ Title: issue.Title, Number: issue.Index, + PosterID: issue.Poster.ID, PosterName: issue.Poster.Login, PosterEmail: issue.Poster.Email, Content: issue.Body, Milestone: milestone, State: string(issue.State), Created: issue.Created, + Updated: issue.Updated, Labels: labels, Closed: closed, } -- cgit v1.2.3