aboutsummaryrefslogtreecommitdiffstats
path: root/services/task
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-07-09 13:58:06 +0200
committerGitHub <noreply@github.com>2023-07-09 11:58:06 +0000
commit887a683af97b570a0fb117068c980f3086133ae4 (patch)
treec9d5d41c40a9d2fbeb40a8be27a60d5c13132b69 /services/task
parent115f40e43368fefc776232a2df289b2fcadbb11d (diff)
downloadgitea-887a683af97b570a0fb117068c980f3086133ae4.tar.gz
gitea-887a683af97b570a0fb117068c980f3086133ae4.zip
Update tool dependencies, lock govulncheck and actionlint (#25655)
- Update all tool dependencies - Lock `govulncheck` and `actionlint` to their latest tags --------- Co-authored-by: 6543 <m.huber@kithara.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'services/task')
-rw-r--r--services/task/migrate.go15
1 files changed, 7 insertions, 8 deletions
diff --git a/services/task/migrate.go b/services/task/migrate.go
index bebdb5078b..52b6220a04 100644
--- a/services/task/migrate.go
+++ b/services/task/migrate.go
@@ -71,7 +71,7 @@ func runMigrateTask(t *admin_model.Task) (err error) {
}()
if err = t.LoadRepo(); err != nil {
- return
+ return err
}
// if repository is ready, then just finish the task
@@ -80,16 +80,16 @@ func runMigrateTask(t *admin_model.Task) (err error) {
}
if err = t.LoadDoer(); err != nil {
- return
+ return err
}
if err = t.LoadOwner(); err != nil {
- return
+ return err
}
var opts *migration.MigrateOptions
opts, err = t.MigrateConfig()
if err != nil {
- return
+ return err
}
opts.MigrateToRepoID = t.RepoID
@@ -101,7 +101,7 @@ func runMigrateTask(t *admin_model.Task) (err error) {
t.StartTime = timeutil.TimeStampNow()
t.Status = structs.TaskStatusRunning
if err = t.UpdateCols("start_time", "status"); err != nil {
- return
+ return err
}
// check whether the task should be canceled, this goroutine is also managed by process manager
@@ -133,12 +133,11 @@ func runMigrateTask(t *admin_model.Task) (err error) {
if err == nil {
log.Trace("Repository migrated [%d]: %s/%s", t.Repo.ID, t.Owner.Name, t.Repo.Name)
- return
+ return nil
}
if repo_model.IsErrRepoAlreadyExist(err) {
- err = errors.New("the repository name is already used")
- return
+ return errors.New("the repository name is already used")
}
// remoteAddr may contain credentials, so we sanitize it