Skip to content

Commit 422c30d

Browse files
Refactored and fixed migration tests. (#16714)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
1 parent 65c6acc commit 422c30d

10 files changed

+744
-485
lines changed

modules/migrations/gitea_downloader.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func (g *GiteaDownloader) GetMilestones() ([]*base.Milestone, error) {
181181

182182
for i := range ms {
183183
// old gitea instances dont have this information
184-
createdAT := time.Now()
184+
createdAT := time.Time{}
185185
var updatedAT *time.Time
186186
if ms[i].Closed != nil {
187187
createdAT = *ms[i].Closed
@@ -548,11 +548,11 @@ func (g *GiteaDownloader) GetPullRequests(page, perPage int) ([]*base.PullReques
548548
assignees = append(assignees, pr.Assignees[i].UserName)
549549
}
550550

551-
createdAt := time.Now()
551+
createdAt := time.Time{}
552552
if pr.Created != nil {
553553
createdAt = *pr.Created
554554
}
555-
updatedAt := time.Now()
555+
updatedAt := time.Time{}
556556
if pr.Created != nil {
557557
updatedAt = *pr.Updated
558558
}

0 commit comments

Comments
 (0)