Conversation
zepatrik
left a comment
There was a problem hiding this comment.
Nice, I just have some minor improvement suggestions 😉
| if id == uuid.Nil { | ||
| return nil, errors.Errorf("No project selected! Please use the flag --project to specify one.\n") | ||
| } |
There was a problem hiding this comment.
I would move this error message to the very top of this function and make the condition projectOrSlug == "". At this point, the proper error should be similar to no project found with slug %s, only slugs %v are known. This makes it a lot easier for users to spot their mistakes.
There was a problem hiding this comment.
Thanks for the review! :)
Should the output look like this then or should we only show the closest slug?
no project found with slug romantic-kilby-g76if4751f, only slugs known are:
romantic-kilby-g76if4751e
busy-jang-bwemahrjn5
busy-black-v1msdqmms0
ecstatic-swartz-ququpvs916
peaceful-kare-ugrr1tziby
stoic-dijkstra-4x7qznhyru
There was a problem hiding this comment.
I would just print the whole list. Maybe you can use the command listing the projects instead? It should at least have a type to show projects as nice tables.
zepatrik
left a comment
There was a problem hiding this comment.
Nice 👍
We should also make sure that in all flag and argument documentation is up to date.
Co-authored-by: Patrik <zepatrik@users.noreply.github.com>
Co-authored-by: Patrik <zepatrik@users.noreply.github.com>
This PR enables supplying slugs to
cmd subcmd project PROJECTORSLUG/cmd ls identities PROJECTORSLUG.Related Issue or Design Document
closes #267
closes #156
Checklist
and signed the CLA.
introduces a new feature.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got approval (please contact
security@ory.sh) from the maintainers to push
the changes.
works.
appropriate).
Further comments