Skip to content

Commit

Permalink
Update migrate.go
Browse files Browse the repository at this point in the history
fixed task not created after create repository
  • Loading branch information
hi-noikiy committed May 11, 2024
1 parent 1f3ada4 commit 2a60f67
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions routers/api/v1/repo/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package repo

import (
"bytes"
"code.gitea.io/gitea/services/task"
"errors"
"fmt"
"net/http"
Expand Down Expand Up @@ -186,6 +187,12 @@ func Migrate(ctx *context.APIContext) {

opts.MigrateToRepoID = repo.ID

err = task.MigrateRepository(ctx, ctx.Doer, repoOwner, opts)
if err != nil {
handleMigrateError(ctx, repoOwner, err)
return
}

defer func() {
if e := recover(); e != nil {
var buf bytes.Buffer
Expand Down

0 comments on commit 2a60f67

Please sign in to comment.