this is a partial fix to #378, making the command available outside of a local repo.
new behaviour:
- when run interactively without local repo context, the head repo prompt is not pre-populated
- when run with flags without local repo context, it will complain unless `--head` is specified
refactor:
- pass TeaContext down to task.CreatePull
Co-authored-by: Norwin <git@nroo.de>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/393
Reviewed-by: Alexey 〒erentyev <axifive@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>
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>
Pull Detailview: add head/base-branch, reviews, mergable info
print info if reviews can not be loaded
No Conflicts
Reviewed-on: https://gitea.com/gitea/tea/pulls/271
Reviewed-by: Norwin <noerw@noreply.gitea.io>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-Authored-By: 6543 <6543@obermui.de>
Co-Committed-By: 6543 <6543@obermui.de>
simplify NormalizeURL
drop noisy log line
must have been introduced recently?
dont use PascalCase for default login names
...for readability.
🔥 opinionated commit
create GenerateLoginName()
fixes
fixup! Merge branch 'master' into refactor-loginMain
move GetOwnerAndRepo() to modules/utils/parse.go
Merge branch 'master' into refactor-loginMain
make linter happy
refactor addLoginMain()
Co-authored-by: Norwin Roosen <git@nroo.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/201
Reviewed-by: 6543 <6543@noreply.gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>
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>