Skip to content

Improve migrations to support migrating milestones/labels/issues/comments/pullrequests #6290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
May 7, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2abe18d
add migrations
lunny Mar 9, 2019
e9fc803
fix package dependency
lunny Mar 16, 2019
d815335
fix lints
lunny Mar 16, 2019
123bbf4
implements migrations except pull requests
lunny Mar 16, 2019
ed0d7b3
add releases
lunny Mar 18, 2019
fdf8587
migrating releases
lunny Mar 18, 2019
4d6f2ec
fix bug
lunny Mar 18, 2019
91e1e8a
fix lint
lunny Mar 19, 2019
68c45d7
fix migrate releases
lunny Mar 19, 2019
ee40b90
fix tests
lunny Mar 19, 2019
5ba541c
add rollback
lunny Mar 19, 2019
15593a0
pull request migtations
lunny Mar 24, 2019
236db6a
fix import
lunny Mar 29, 2019
776e573
fix go module vendor
lunny Mar 29, 2019
6a1d7f2
add tests for upload to gitea
lunny Mar 29, 2019
e805c0e
more migrate options
lunny Mar 30, 2019
54ccf25
fix swagger-check
lunny Mar 30, 2019
4f4cf6f
fix misspell
lunny Mar 30, 2019
78bfe38
add options on migration UI
lunny Mar 30, 2019
74e49a8
fix log error
lunny Apr 12, 2019
0c9b781
improve UI options on migrating
lunny Apr 12, 2019
529fc0d
add support for username password when migrating from github
lunny Apr 12, 2019
4aae288
fix tests
lunny Apr 12, 2019
766945b
remove comments and fix migrate limitation
lunny Apr 13, 2019
21ba2ba
improve error handles
lunny Apr 13, 2019
3997e95
migrate API will also support migrate milestones/labels/issues/pulls/…
lunny Apr 14, 2019
7040908
fix tests and remove unused codes
lunny Apr 14, 2019
9dd95f5
add DownloaderFactory and docs about how to create a new Downloader
lunny Apr 15, 2019
f14a09f
fix misspell
lunny Apr 15, 2019
d27bffc
fix migration docs
lunny Apr 16, 2019
6d06ae4
Add hints about migrate options on migration page
lunny May 5, 2019
d798b0d
fix tests
lunny May 5, 2019
5436028
Merge branch 'master' into lunny/migrations
techknowlogick May 6, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix log error
  • Loading branch information
lunny committed May 5, 2019
commit 74e49a8d423b702f8259dc9274c2d28489b34f7a
4 changes: 2 additions & 2 deletions modules/migrations/gitea.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ func (g *GiteaLocalUploader) CreatePullRequest(pr *base.PullRequest) error {
// git remote add
err := g.gitRepo.AddRemote(remote, pr.Head.CloneURL, true)
if err != nil {
log.Error(4, "AddRemote failed: %s", err)
log.Error("AddRemote failed: %s", err)
} else {
g.prHeadCache[remote] = struct{}{}
ok = true
Expand All @@ -329,7 +329,7 @@ func (g *GiteaLocalUploader) CreatePullRequest(pr *base.PullRequest) error {
if ok {
_, err = git.NewCommand("fetch", remote, pr.Head.Ref).RunInDir(g.repo.RepoPath())
if err != nil {
log.Error(4, "Fetch branch from %s failed: %v", pr.Head.CloneURL, err)
log.Error("Fetch branch from %s failed: %v", pr.Head.CloneURL, err)
} else {
headBranch := filepath.Join(g.repo.RepoPath(), "refs", "heads", pr.Head.OwnerName, pr.Head.Ref)
if err := os.MkdirAll(filepath.Dir(headBranch), os.ModePerm); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion modules/migrations/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func MigrateRepository(doer *models.User, ownerName string, opts MigrateOptions)

if err := migrateRepository(downloader, uploader, opts); err != nil {
if err1 := uploader.Rollback(); err1 != nil {
log.Error(4, "rollback failed: %v", err1)
log.Error("rollback failed: %v", err1)
}
return nil, err
}
Expand Down