feat: ability to set and modify the default project#287
Conversation
c723a01 to
18c5fe4
Compare
d89c0e9 to
f7e04c0
Compare
|
I have not done a full code review yet, but from a high level this looks very good :) Nice job! I will try to do a detailed code review in the next days |
In the documentation, we will probably need to use this flag everywhere, because we often would do: In my mind, when I create a project, I usually want to continue modifying it. My proposal would be to reverse this logic: WDYT? |
I'm not a big fan of implicit side effects as in my experience they often tend to cause confusion and unexpected behaviour. For the documentation I would probably recommend not to rely on the "current project" logic at all and always be specific for this exact reason. For the special case when a project is created and no default was set, the default is implicitly set to the newly created project, which is fine in this context. |
|
Point made, point taken :) |
24aef9d to
0815a3a
Compare
|
@hperl could you maybe help out with a review here? :) |
hperl
left a comment
There was a problem hiding this comment.
This looks really good already 🎉. I especially like the thorough testing 🤩. I added some remarks below.
aeneasr
left a comment
There was a problem hiding this comment.
Great :) Thank you for paying extra attention in the tests! Generally speaking, this looks quite good to me. There are two comments related to Go standards. Similar to Henning, I suggest to reduce the duplication in the tests. Especially for larger tests (such as patch) it's adding way too much bloat.
I left a comment which could help you implement the tests without duplication. We use this pattern already quite extensively in Ory Kratos
0ce1702 to
2cb545d
Compare
Adds the new command
use projectto the cli that can be used to manipulate the selected project.Examples
--use-projectis provided or the currently selected project is invalid.Related Issue or Design Document
closes #154
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