Skip to content

Commit

Permalink
Refactored and fixed migration tests. (#16714)
Browse files Browse the repository at this point in the history
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
  • Loading branch information
KN4CK3R and techknowlogick authored Aug 18, 2021
1 parent 65c6acc commit 422c30d
Show file tree
Hide file tree
Showing 10 changed files with 744 additions and 485 deletions.
6 changes: 3 additions & 3 deletions modules/migrations/gitea_downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down
Loading

0 comments on commit 422c30d

Please sign in to comment.