introduce TeaContext
clean up InitCommand
move GetListOptions to TeaContext
ensure context for each command
so we fail early with a good error message instead of "Error: 404" etc
make linter happy
Merge branch 'master' into refactor-global-flags
move TeaContext & InitCommand to modules/context
Merge branch 'master' into refactor-global-flags
CI.restart()
Merge branch 'master' into refactor-global-flags
Merge branch 'master' into refactor-global-flags
Co-authored-by: Norwin Roosen <git@nroo.de>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/291
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: khmarbaise <khmarbaise@noreply.gitea.io>
Reviewed-by: 6543 <6543@obermui.de>
Co-Authored-By: Norwin <noerw@noreply.gitea.io>
Co-Committed-By: Norwin <noerw@noreply.gitea.io>
checkout: use configured protocol for PR checkout
instead of defaulting to ssh if that is enabled
this might fix#262
login add: try to find a matching ssh key & store it in config
possibly expensive operation should be done once
pr checkout: don't fetch ssh keys
As a result, we don't try to pull via ssh, if no privkey was configured.
This increases chances of a using ssh only on a working ssh setup.
fix import order
remove debug print statement
improve ssh-key value docs
rm named return & fix pwCallback nil check
Co-authored-by: Norwin Roosen <git@nroo.de>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/277
Reviewed-by: khmarbaise <khmarbaise@noreply.gitea.io>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-Authored-By: Norwin <noerw@noreply.gitea.io>
Co-Committed-By: Norwin <noerw@noreply.gitea.io>
drop tea mile alias
document command schema in CONTRIBUTING.md
and update this file, its a plain copy from gitea
add "list" as alias for "ls" subcommand
add singular command aliases
Co-authored-by: Norwin Roosen <git@nroo.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/208
Reviewed-by: 6543 <6543@noreply.gitea.io>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
fix lint
fix lint
Move print TrackedTimesList to print package
Move AbsPathWithExpansion to utils/path.go
rename module intern to config
Move Subcomands into it's own Packages
Split times subcomands into own sourcefiles
Split repos subcomands into own sourcefiles
Split releases subcomands into own sourcefiles
Split pulls subcomands into own sourcefiles
Split milestones subcomands into own sourcefiles
Split login subcomands into own sourcefiles
Split labels subcomands into own sourcefiles
split issues subcomands into own sourcefiles
mv
Move Interactive Login Creation to interact package
Move Add Login function to intern/login.go
apply from review
lint: add description to exported func
smal nits
Move DetailViews stdout print func to print package
Refactor:
* Move Config & Login routines into intern package
* rename global var in cmd
* Move help func to utils
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/206
Reviewed-by: Norwin <noerw@noreply.gitea.io>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>