summaryrefslogtreecommitdiffstats
path: root/modules/migrations
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-09-01 22:52:38 +0100
committerGitHub <noreply@github.com>2021-09-01 17:52:38 -0400
commit02de43236a837eefa40d59ecfef9761043a8f292 (patch)
treeffd6fbb58a08ddd75bbcf9d0a1341d80238ae7f1 /modules/migrations
parentf949f9e9c584f8986b26e6e649601fad93ece043 (diff)
downloadgitea-02de43236a837eefa40d59ecfef9761043a8f292.tar.gz
gitea-02de43236a837eefa40d59ecfef9761043a8f292.zip
Gitlab Migrator: dont ignore reactions of last request (#16903) (#16913)
Backport #16903 Fix bug related to early breaking when migrating reactions. Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'modules/migrations')
-rw-r--r--modules/migrations/gitlab.go18
1 files changed, 12 insertions, 6 deletions
diff --git a/modules/migrations/gitlab.go b/modules/migrations/gitlab.go
index fe763f9900..08672dd118 100644
--- a/modules/migrations/gitlab.go
+++ b/modules/migrations/gitlab.go
@@ -396,12 +396,15 @@ func (g *GitlabDownloader) GetIssues(page, perPage int) ([]*base.Issue, bool, er
if err != nil {
return nil, false, fmt.Errorf("error while listing issue awards: %v", err)
}
- if len(awards) < perPage {
- break
- }
+
for i := range awards {
reactions = append(reactions, g.awardToReaction(awards[i]))
}
+
+ if len(awards) < perPage {
+ break
+ }
+
awardPage++
}
@@ -558,12 +561,15 @@ func (g *GitlabDownloader) GetPullRequests(page, perPage int) ([]*base.PullReque
if err != nil {
return nil, false, fmt.Errorf("error while listing merge requests awards: %v", err)
}
- if len(awards) < perPage {
- break
- }
+
for i := range awards {
reactions = append(reactions, g.awardToReaction(awards[i]))
}
+
+ if len(awards) < perPage {
+ break
+ }
+
awardPage++
}