tea pr create: make local repo optional #393

Merged
6543 merged 7 commits from noerw/tea:fix-378 into master 11 months ago
Collaborator

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 12 months ago
noerw added the
kind/enhancement
label 12 months ago
noerw added 1 commit 12 months ago
continuous-integration/drone/pr Build is passing Details
3d7e86575c
pr create: make local repo optional
noerw reviewed 12 months ago
promptOpts := survey.WithValidator(survey.Required)
headOwner, headBranch, err := task.GetDefaultPRHead(localRepo)
// TODO: can't we use TeaContext.LocalRepo for this?
Poster
Collaborator

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?

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

see no obstacles to use `context.TeaContext`, but will wait @6543
6543 commented 11 months ago
Collaborator

added refactor

added refactor
6543 marked this conversation as resolved
noerw added 1 commit 11 months ago
continuous-integration/drone/pr Build is passing Details
f25be4a13c
Merge branch 'master' into fix-378
6543 added 1 commit 11 months ago
continuous-integration/drone/pr Build is passing Details
816b31472f
Merge branch 'master' into fix-378
axifive approved these changes 11 months ago
6543 added 1 commit 11 months ago
continuous-integration/drone/pr Build is passing Details
9a6802d911
refactor: use TeaContext
6543 added 1 commit 11 months ago
continuous-integration/drone/pr Build is passing Details
6fadc4ca88
Merge branch 'master' into fix-378
6543 added 2 commits 11 months ago
Collaborator

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

@noerw can you test - this should now close #378
6543 approved these changes 11 months ago
Poster
Collaborator

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 11 months ago
6543 added the
kind/refactor
label 11 months ago
6543 deleted branch fix-378 11 months ago

Reviewers

axifive approved these changes 11 months ago
6543 approved these changes 11 months 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.