Add --repo filter to more gh codespaces commands#6669
Merged
Conversation
Member
Author
|
Note that I do intend to add tests for this, but wanted to get sign off on the approach first 😄 |
cmbrose
commented
Dec 12, 2022
cmbrose
commented
Dec 13, 2022
Member
Author
|
cc @cli/code-reviewers - would appreciate feedback here when possible |
samcoe
reviewed
Feb 7, 2023
Contributor
There was a problem hiding this comment.
@cmbrose Sorry for the delay in taking a look at this. I think what you have and the path you are taking works but in my comments I propose a different approach to the problem which I think would be easier to use as well as maintain in the future. Let me know if you have any questions about my comments.
cmbrose
commented
Feb 14, 2023
samcoe
reviewed
Feb 15, 2023
Member
Author
|
@samcoe thanks for all the help on this review! It should be in a good state now for a last review 😄 |
jungaretti
approved these changes
Feb 22, 2023
Contributor
jungaretti
left a comment
There was a problem hiding this comment.
This looks great! You used elegant patterns that we can use in other places too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #6548
This adds a new
-r/--repoargument to many codespace commands which don't already have it -code,stop,jupyter,ssh, etc. The argument pre-filters the codespace selection list and, if there is only a single codespace for the repo, automatically selects it.See the example below which showcases:
you have no codespaceserrorNote selecting both
--codespaceand--repofor these commands doesn't really make sense and so doing so results in an error: