fix InitCommand() #285

Merged
6543 merged 7 commits from noerw/tea:issue-200-initcommand into master 2 years ago
noerw commented 2 years ago
Collaborator
  • 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 2 years ago
f422ac321a
split modules/config
a6cf2f092c
rework InitCommand()
2635a7083d
remove InitCommandLoginOnly()
noerw added the
kind/bug
label 2 years ago
noerw added this to the v0.6.0 milestone 2 years ago
noerw added the
kind/refactor
status/needs-reviews
labels 2 years ago
noerw added 1 commit 2 years ago
09ed301290 Merge branch 'master' into issue-200-initcommand
noerw added 1 commit 2 years ago
bc249465b6
improve docs
6543 added 1 commit 2 years ago
f379b34993 Merge branch 'master' into issue-200-initcommand
6543 reviewed 2 years ago
Dismissed
// 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.
6543 commented 2 years ago
Collaborator

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 ?
noerw commented 2 years ago
Poster
Collaborator

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
noerw commented 2 years ago
Poster
Collaborator

(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)
6543 commented 2 years ago
Collaborator

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 2 years ago
16034f60e0
move config func and config task func to right place
6543 approved these changes 2 years ago
Dismissed
6543 force-pushed issue-200-initcommand from 16034f60e0 to 580c55d751 2 years ago
Collaborator

@noerw I created 580c55d751 based on #285.

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 :)
Poster
Collaborator

@6543 yeah sounds good :) thanks

@6543 yeah sounds good :) thanks
khmarbaise approved these changes 2 years ago
Dismissed
6543 merged commit 7e191eb18b into master 2 years ago
6543 referenced this issue from a commit 2 years ago
6543 removed the
status/needs-reviews
label 2 years ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as 7e191eb18b.
Sign in to join this conversation.
Loading…
There is no content yet.