-
Notifications
You must be signed in to change notification settings - Fork 887
chore: remove UpsertCustomRole in favor of Insert + Update #14217
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
Conversation
🤖 Meticulous spotted visual differences in 35 of 1355 screens tested: view and approve differences detected. Last updated for commit 2d81996. This comment will update as new commits are pushed. |
28f3603
to
14da05a
Compare
@jaaydenh mentioned he needs to make a UI PR to migrate the UI to move away from upsert |
switch createNewRole { | ||
case true: | ||
updated, err = client.CreateOrganizationRole(ctx, customRole) | ||
default: | ||
updated, err = client.UpdateOrganizationRole(ctx, customRole) | ||
} |
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 feels like a smell to me, my gut would say that we should just have a separate create
cli command. If the UI needs to make the distinction, sounds like we should do the same for the CLI.
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.
You are right @f0ssel. This PR is already quite big, and we are not launching this yet. Can I create an issue to split these out into 2 commands and do it in another PR?
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.
Totally 👍
14da05a
to
c567a9d
Compare
* fix: use insert and update instead of upsert * fix: cleanup
05f1814
to
2d81996
Compare
Upsert was causing some ui issues, it is better to make these an explicit create or an update.
This was request by @jaaydenh to make the UI experience more fluid. Essentially you do not want to mistakenly create a role. A create and update should be explicit.