improved logging
try to use local branch before creating pulls/<PR>
useful for checking out your own PRs
reorder imports
refactor pulls checkout
isolated "gitea API to local git cfg" aspect
work around go-git limitation
As we cant manage multiple remote URLs properly, we just set the correct
URL protocol ahead of time.
This logic won't apply for already existing HTTPS remotes, these
should be deleted before using `tea pr checkout`.
use SSH if user has key in gitea
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Norwin Roosen <git@nroo.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/192
Reviewed-by: 6543 <6543@noreply.gitea.io>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-Authored-By: Norwin <noerw@noreply.gitea.io>
Co-Committed-By: Norwin <noerw@noreply.gitea.io>