Remove Interact Dependency Of Task Module (#280)

remove interact dependency in task module

accept nil callback

format code

Reviewed-on: https://gitea.com/gitea/tea/pulls/280
Reviewed-by: Norwin <noerw@noreply.gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>
Co-Authored-By: 6543 <6543@obermui.de>
Co-Committed-By: 6543 <6543@obermui.de>
This commit is contained in:
6543
2020-12-08 19:25:21 +08:00
committed by Andrew Thornton
parent 5cb3e1ded5
commit c98441b13c
5 changed files with 15 additions and 14 deletions

View File

@ -9,6 +9,7 @@ import (
"code.gitea.io/tea/cmd/flags"
"code.gitea.io/tea/modules/config"
"code.gitea.io/tea/modules/interact"
"code.gitea.io/tea/modules/task"
"code.gitea.io/tea/modules/utils"
@ -35,5 +36,5 @@ func runPullsCheckout(ctx *cli.Context) error {
return err
}
return task.PullCheckout(login, owner, repo, idx)
return task.PullCheckout(login, owner, repo, idx, interact.PromptPassword)
}

View File

@ -9,6 +9,7 @@ import (
"code.gitea.io/tea/cmd/flags"
"code.gitea.io/tea/modules/config"
"code.gitea.io/tea/modules/interact"
"code.gitea.io/tea/modules/task"
"code.gitea.io/tea/modules/utils"
@ -41,5 +42,5 @@ func runPullsClean(ctx *cli.Context) error {
return err
}
return task.PullClean(login, owner, repo, idx, ctx.Bool("ignore-sha"))
return task.PullClean(login, owner, repo, idx, ctx.Bool("ignore-sha"), interact.PromptPassword)
}