New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --repo
filter to more gh codespaces
commands
#6669
Conversation
Note that I do intend to add tests for this, but wanted to get sign off on the approach first 😄 |
cc @cli/code-reviewers - would appreciate feedback here when possible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
@samcoe thanks for all the help on this review! It should be in a good state now for a last review 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmbrose This looks awesome, 🚢. Thanks for being patient with the review cycles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! You used elegant patterns that we can use in other places too.
Fixes: #6548
This adds a new
-r/--repo
argument 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 codespaces
errorNote selecting both
--codespace
and--repo
for these commands doesn't really make sense and so doing so results in an error: