Skip to content

Commit 099c7cf

Browse files
Loïc Dacharyrealaravinth
Loïc Dachary
authored andcommitted
UpdateRepoStats must be run from InsertIssues not insertIssue
1 parent 26b2ff7 commit 099c7cf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

models/migrate.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ func InsertIssues(issues ...*Issue) error {
5252
return err
5353
}
5454
}
55+
err = UpdateRepoStats(ctx, issues[0].RepoID)
56+
if err != nil {
57+
return err
58+
}
5559
return committer.Commit()
5660
}
5761

@@ -83,7 +87,7 @@ func insertIssue(ctx context.Context, issue *Issue) error {
8387
}
8488
}
8589

86-
return UpdateRepoStats(ctx, issue.RepoID)
90+
return nil
8791
}
8892

8993
// InsertIssueComments inserts many comments of issues.

0 commit comments

Comments
 (0)