1
0
Fork 0
forked from forgejo/forgejo

Use batch insert on migrating repository to make the process faster (#7050)

* Use batch insert on migrating repository to make the process faster

* fix lint

* fix tests

* fix comments
This commit is contained in:
Lunny Xiao 2019-06-29 21:38:22 +08:00 committed by GitHub
parent e463bdaf8d
commit 462284e2f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 343 additions and 242 deletions

View file

@ -5,14 +5,14 @@
package base
// Uploader uploads all the informations
// Uploader uploads all the informations of one repository
type Uploader interface {
CreateRepo(repo *Repository, includeWiki bool) error
CreateMilestone(milestone *Milestone) error
CreateRelease(release *Release) error
CreateLabel(label *Label) error
CreateIssue(issue *Issue) error
CreateComment(issueNumber int64, comment *Comment) error
CreatePullRequest(pr *PullRequest) error
CreateMilestones(milestones ...*Milestone) error
CreateReleases(releases ...*Release) error
CreateLabels(labels ...*Label) error
CreateIssues(issues ...*Issue) error
CreateComments(comments ...*Comment) error
CreatePullRequests(prs ...*PullRequest) error
Rollback() error
}