Skip to content
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

Merged
merged 18 commits into from
Apr 30, 2021
Merged

Conversation

Widcket
Copy link
Contributor

@Widcket Widcket commented Apr 27, 2021

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.

Screen Shot 2021-04-26 at 21 04 20

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

Screen Shot 2021-04-26 at 21 29 41

After

Screen Shot 2021-04-26 at 21 34 25

References

Supersedes #260

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

@Widcket Widcket requested a review from a team April 27, 2021 00:32
@Widcket Widcket mentioned this pull request Apr 27, 2021
3 tasks
apiTokenLifetime = Flag{
Name: "Token Lifetime",
LongForm: "token-lifetime",
ShortForm: "l",
Copy link
Contributor

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

Copy link
Contributor Author

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.

@Widcket Widcket merged commit 8f52e8f into main Apr 30, 2021
@Widcket Widcket deleted the new-api-properties branch April 30, 2021 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants