replace flag globals, require context for commands #291

Merged
6543 merged 11 commits from noerw/tea:refactor-global-flags into master 2020-12-15 17:38:23 +00:00
Member

Another big refactor, I'm sorry :( this should be the last one for now..
If needed I can split this up, but all changes depend on each other anyway.

  • removes global flag values in cmd/flags (closes #158)
  • introduces TeaContext, a wrapper around cli.Context
  • simplifies InitCommand() call signature to return TeaContext
  • checks command requirements on TeaContext via ctx.Ensure()
context

Since #285 all commands can be run outside of a git repo.
For some commands this was desired, for others requirements are too loose now.
This readds requirement checks in a more flexible way.
Could be considered a bugfix and should go into v0.6.0

Another big refactor, I'm sorry :( this should be the last one for now.. If needed I can split this up, but all changes depend on each other anyway. - removes global flag values in `cmd/flags` (closes #158) - introduces `TeaContext`, a wrapper around `cli.Context` - simplifies `InitCommand()` call signature to return `TeaContext` - checks command requirements on TeaContext via `ctx.Ensure()` ##### context Since #285 all commands can be run outside of a git repo. For some commands this was desired, for others requirements are too loose now. This readds requirement checks in a more flexible way. Could be considered a bugfix and should go into v0.6.0
noerw added this to the v0.6.0 milestone 2020-12-12 17:17:53 +00:00
noerw added the
kind
enhancement
kind
refactor
status/needs-reviews
labels 2020-12-12 17:17:53 +00:00
noerw added 4 commits 2020-12-12 17:17:54 +00:00
ensure context for each command
so we fail early with a good error message instead of "Error: 404" etc
Some checks failed
continuous-integration/drone/pr Build is failing
98cebeb04f
noerw added 1 commit 2020-12-12 17:35:38 +00:00
make linter happy
All checks were successful
continuous-integration/drone/pr Build is passing
a60fd06a57
6543 added 1 commit 2020-12-12 18:26:23 +00:00
Merge branch 'master' into refactor-global-flags
All checks were successful
continuous-integration/drone/pr Build is passing
91502cd219
noerw added 1 commit 2020-12-12 18:38:04 +00:00
move TeaContext & InitCommand to modules/context
All checks were successful
continuous-integration/drone/pr Build is passing
9919dda680
6543 added 1 commit 2020-12-14 10:47:00 +00:00
6543 added 1 commit 2020-12-14 11:32:25 +00:00
CI.restart()
All checks were successful
continuous-integration/drone/pr Build is passing
d5286478a5
6543 modified the milestone from v0.6.0 to v0.7.0 2020-12-14 11:37:47 +00:00
noerw added 1 commit 2020-12-14 12:59:28 +00:00
Merge branch 'master' into refactor-global-flags
All checks were successful
continuous-integration/drone/pr Build is passing
c7dd68b5c5
lunny approved these changes 2020-12-15 05:03:14 +00:00
Dismissed
Owner

Please resolve the conflicts.

Please resolve the conflicts.
khmarbaise approved these changes 2020-12-15 06:45:34 +00:00
Dismissed
6543 removed the
status/needs-reviews
label 2020-12-15 07:26:51 +00:00
noerw added 1 commit 2020-12-15 11:02:46 +00:00
Merge branch 'master' into refactor-global-flags
All checks were successful
continuous-integration/drone/pr Build is passing
98a775e058
6543 approved these changes 2020-12-15 17:38:11 +00:00
Dismissed
6543 merged commit dc67630b64 into master 2020-12-15 17:38:23 +00:00
Sign in to join this conversation.
No description provided.