fix InitCommand() #285

Merged
6543 merged 7 commits from noerw/tea:issue-200-initcommand into master 2020-12-11 09:07:30 +00:00
Member
  • fixes #200: make InitCommand error tolerant if $PWD is not a git repo
  • fixes #191: don't force default login when repo flag is set
- fixes #200: make InitCommand error tolerant if $PWD is not a git repo - fixes #191: don't force default login when repo flag is set
noerw added 3 commits 2020-12-08 22:49:18 +00:00
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
#158
- 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()
All checks were successful
continuous-integration/drone/pr Build is passing
2635a7083d
noerw added the
kind/bug
label 2020-12-08 22:50:20 +00:00
noerw added this to the v0.6.0 milestone 2020-12-08 22:50:24 +00:00
noerw added the
kind
refactor
status/needs-reviews
labels 2020-12-08 22:50:42 +00:00
noerw added 1 commit 2020-12-08 22:55:33 +00:00
Merge branch 'master' into issue-200-initcommand
All checks were successful
continuous-integration/drone/pr Build is passing
09ed301290
noerw added 1 commit 2020-12-09 14:36:44 +00:00
improve docs
Some checks reported errors
continuous-integration/drone/pr Build encountered an error
bc249465b6
6543 added 1 commit 2020-12-09 22:10:41 +00:00
Merge branch 'master' into issue-200-initcommand
All checks were successful
continuous-integration/drone/pr Build is passing
f379b34993
6543 reviewed 2020-12-09 22:15:32 +00:00
Dismissed
@ -0,0 +1,165 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
Owner

is there a reason so split this up into login_tasks.go

do we have some sort of rule to know witch func is going into this file or login.go ?

is there a reason so split this up into login_tasks.go do we have some sort of rule to know witch func is going into this file or login.go ?
Author
Member

I split the files because I never found what I was looking for.

  • login.go holds the Login struct and all its attached methods
  • login_tasks.go is what later should go into modules/tasks/login.go (ie. not Login methods
I split the files because I never found what I was looking for. - `login.go` holds the `Login` struct and all its attached methods - `login_tasks.go` is what later should go into `modules/tasks/login.go` (ie. not `Login` methods
Author
Member

(I'm open to merging the files again if you don't want to move login_tasks into the tasks module once #158 is fixed)

(I'm open to merging the files again if you don't want to move login_tasks into the tasks module once #158 is fixed)
Owner

I agree, e.g. Create-/Generate- Login can go into task ...

but GetDefaultLogin and GetLoginByName is definetly something I expect to be in the config module ...

I agree, e.g. Create-/Generate- Login can go into task ... but GetDefaultLogin and GetLoginByName is definetly something I expect to be in the config module ...
noerw marked this conversation as resolved
6543 added 1 commit 2020-12-11 08:33:37 +00:00
move config func and config task func to right place
All checks were successful
continuous-integration/drone/pr Build is passing
16034f60e0
6543 approved these changes 2020-12-11 08:35:56 +00:00
Dismissed
6543 force-pushed issue-200-initcommand from 16034f60e0 to 580c55d751 2020-12-11 08:43:04 +00:00 Compare
Owner

@noerw I created 580c55d751 based on #285 (comment).

So I'll need your OK too ..

  • GetLoginByName: only intract with config -> login.go
  • GenerateLoginName: only interact with config and return name suggestion based on it -> login.go
  • DeleteLogin: only rm a login from config -> login.go
  • ...
  • AddLogin: creates api calls and get a Login to store ad the end (can be split into the func for task module and the function witch simply insert a Login struct into config)
  • GenerateToken: I think this is something for tasks module :)
@noerw I created 580c55d7518879d9e145133fda9c3da73bd4c723 based on https://gitea.com/gitea/tea/pulls/285#issuecomment-121779. So I'll need your OK too .. - **GetLoginByName**: only intract with config -> login.go - **GenerateLoginName**: only interact with config and return name suggestion based on it -> login.go - **DeleteLogin**: only rm a login from config -> login.go - ... - **AddLogin**: creates api calls and get a Login to store ad the end (can be split into the func for task module and the function witch simply insert a Login struct into config) - **GenerateToken**: I think this is something for tasks module :)
Author
Member

@6543 yeah sounds good :) thanks

@6543 yeah sounds good :) thanks
khmarbaise approved these changes 2020-12-11 08:59:27 +00:00
Dismissed
6543 merged commit 7e191eb18b into master 2020-12-11 09:07:29 +00:00
6543 referenced this issue from a commit 2020-12-11 09:07:29 +00:00
6543 removed the
status/needs-reviews
label 2020-12-11 09:07:57 +00:00
Sign in to join this conversation.
No description provided.