mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-02 18:08:30 +02:00
fix InitCommand() (#285)
split modules/config login_tasks.go should probably be modules/task/login.go, but i didn't do that, as it still depends on the global `Config` variable from the config module, see https://gitea.com/gitea/tea/issues/158 rework InitCommand() - make it error tolerant if $PWD is not a git repo (#200) - don't force default login when repo flag is set (#191) remove InitCommandLoginOnly() Merge branch 'master' into issue-200-initcommand improve docs Merge branch 'master' into issue-200-initcommand move config func and config task func to right place Co-authored-by: Norwin Roosen <git@nroo.de> Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/285 Reviewed-by: 6543 <6543@obermui.de> Reviewed-by: khmarbaise <khmarbaise@noreply.gitea.io> Co-Authored-By: Norwin <noerw@noreply.gitea.io> Co-Committed-By: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
@ -83,7 +83,7 @@ var CmdRepoCreate = cli.Command{
|
||||
}
|
||||
|
||||
func runRepoCreate(ctx *cli.Context) error {
|
||||
login := config.InitCommandLoginOnly(flags.GlobalLoginValue)
|
||||
login, _, _ := config.InitCommand(flags.GlobalRepoValue, flags.GlobalLoginValue, flags.GlobalRemoteValue)
|
||||
client := login.Client()
|
||||
var (
|
||||
repo *gitea.Repository
|
||||
|
@ -45,7 +45,7 @@ var CmdReposList = cli.Command{
|
||||
|
||||
// RunReposList list repositories
|
||||
func RunReposList(ctx *cli.Context) error {
|
||||
login := config.InitCommandLoginOnly(flags.GlobalLoginValue)
|
||||
login, _, _ := config.InitCommand(flags.GlobalRepoValue, flags.GlobalLoginValue, flags.GlobalRemoteValue)
|
||||
client := login.Client()
|
||||
|
||||
typeFilter, err := getTypeFilter(ctx)
|
||||
|
@ -57,7 +57,7 @@ var CmdReposSearch = cli.Command{
|
||||
}
|
||||
|
||||
func runReposSearch(ctx *cli.Context) error {
|
||||
login := config.InitCommandLoginOnly(flags.GlobalLoginValue)
|
||||
login, _, _ := config.InitCommand(flags.GlobalRepoValue, flags.GlobalLoginValue, flags.GlobalRemoteValue)
|
||||
client := login.Client()
|
||||
|
||||
var ownerID int64
|
||||
|
Reference in New Issue
Block a user