summaryrefslogtreecommitdiffstats
path: root/modules/migrations/gogs.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2021-08-18 02:47:18 +0200
committerGitHub <noreply@github.com>2021-08-17 20:47:18 -0400
commit422c30d3157d9f06af43901a1c7978dd25ca12a5 (patch)
tree57e7cf2f93405a0557578dc21ff9488ab48e4333 /modules/migrations/gogs.go
parent65c6acccf693a8d2eb70d59df38d5c3528188390 (diff)
downloadgitea-422c30d3157d9f06af43901a1c7978dd25ca12a5.tar.gz
gitea-422c30d3157d9f06af43901a1c7978dd25ca12a5.zip
Refactored and fixed migration tests. (#16714)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'modules/migrations/gogs.go')
-rw-r--r--modules/migrations/gogs.go6
1 files changed, 2 insertions, 4 deletions
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,
}