tea pr create: make local repo optional #393

Merged
6543 merged 7 commits from noerw/tea:fix-378 into master 1 month ago
noerw commented 2 months ago

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
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
noerw added this to the v0.8.0 milestone 2 months ago
noerw added the
kind/enhancement
label 2 months ago
noerw added 1 commit 2 months ago
3d7e86575c pr create: make local repo optional
noerw reviewed 2 months ago
promptOpts := survey.WithValidator(survey.Required)
headOwner, headBranch, err := task.GetDefaultPRHead(localRepo)
// TODO: can't we use TeaContext.LocalRepo for this?
noerw commented 2 months ago
Poster

I think passing context.TeaContext instead of config.Login in this method would be convenient, as TeaContext already contains the local repo when available.
@6543 In the past you opposed importing modules/context in modules/interact, wdytn?

I think passing `context.TeaContext` instead of `config.Login` in this method would be convenient, as TeaContext already contains the local repo when available. @6543 In the past you opposed importing `modules/context` in `modules/interact`, wdytn?
Poster

see no obstacles to use context.TeaContext, but will wait @6543

see no obstacles to use `context.TeaContext`, but will wait @6543
6543 commented 1 month ago
Poster
Collaborator

added refactor

added refactor
6543 marked this conversation as resolved
noerw added 1 commit 2 months ago
f25be4a13c Merge branch 'master' into fix-378
6543 added 1 commit 2 months ago
816b31472f Merge branch 'master' into fix-378
axifive approved these changes 1 month ago
6543 added 1 commit 1 month ago
9a6802d911
refactor: use TeaContext
6543 added 1 commit 1 month ago
6fadc4ca88 Merge branch 'master' into fix-378
6543 added 2 commits 1 month ago
Collaborator

@noerw can you test - this should now close #378

@noerw can you test - this should now close #378
6543 approved these changes 1 month ago
Poster

your changes lgtm. wrt to the refactor, lets do the rest later → #402

your changes lgtm. wrt to the refactor, lets do the rest later → #402
6543 merged commit 7b7c7f57be into master 1 month ago
6543 added the
kind/refactor
label 1 month ago
6543 deleted branch fix-378 1 month ago

Reviewers

axifive approved these changes 1 month ago
6543 approved these changes 1 month ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as 7b7c7f57be.
Sign in to join this conversation.
Loading…
There is no content yet.