Refactored and fixed migration tests. (#16714)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
KN4CK3R 2021-08-18 02:47:18 +02:00 committed by GitHub
parent 65c6acccf6
commit 422c30d315
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 744 additions and 485 deletions

View file

@ -181,7 +181,7 @@ func (g *GiteaDownloader) GetMilestones() ([]*base.Milestone, error) {
for i := range ms {
// old gitea instances dont have this information
createdAT := time.Now()
createdAT := time.Time{}
var updatedAT *time.Time
if ms[i].Closed != nil {
createdAT = *ms[i].Closed
@ -548,11 +548,11 @@ func (g *GiteaDownloader) GetPullRequests(page, perPage int) ([]*base.PullReques
assignees = append(assignees, pr.Assignees[i].UserName)
}
createdAt := time.Now()
createdAt := time.Time{}
if pr.Created != nil {
createdAt = *pr.Created
}
updatedAt := time.Now()
updatedAt := time.Time{}
if pr.Created != nil {
updatedAt = *pr.Updated
}