-
Notifications
You must be signed in to change notification settings - Fork 51
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 support for new API properties [CLI-139] #265
Conversation
Co-authored-by: Rita Zerrizuela <zeta@widcket.com>
Co-authored-by: Rita Zerrizuela <zeta@widcket.com>
Co-authored-by: Rita Zerrizuela <zeta@widcket.com>
apiTokenLifetime = Flag{ | ||
Name: "Token Lifetime", | ||
LongForm: "token-lifetime", | ||
ShortForm: "l", |
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.
nit:
I can't remember if we have a guideline for shortforms. Why not -tl
--token-lifetime
?. (I don't have a strong opinion on this).
I also think is OK to not define a shortform if the flag is pretty specific and optional
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.
Currently we do not have short forms for global flags, while non-global flags do have short forms. That makes global flags stand out.
That means that every non-global flag needs a short form.
Currently we do not have guidelines, but have always used a single letter. However, as long as the CLI remains experimental, we could review at a latter date and arrive at a decision.
Description
This PR builds on the work made by @bright-poku on #260 and tackles the additional challenges this task presented, as some refactor was needed to properly handle all update cases of boolean properties.
This PR also fixes a bug when updating a rule and passing only non-boolean parameters by flag, which causes the rule to be updated with the default value of the boolean parameters, instead of the existing value.
Before
After
References
Supersedes #260
Testing
Checklist
master