-
Notifications
You must be signed in to change notification settings - Fork 38
Fix a bug parsing kubeconfig if the user context was empty string. #44
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
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| context['cluster'] = find_cluster(context['cluster']) | ||
| end | ||
| context['user'] = find_user(context['user']) if context['user'] | ||
| if context['user'] && context['user'].length > 0 |
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.
Just FYI you can do context['user'] = find_user(context['user']) if context['user'].blank? Then you should be able to keep the line the same.
I don't think it matters too much but if you do keep the if block can we remove the 2nd if check its kinda redundant and makes it harder to read.
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.
Also, I think it would solve the rubocop warnings too :)
|
@drubin looks like (and using an |
|
@drubin friendly ping on this one if you're around. Thanks! |
|
@brendandburns sorry been a busy week. Also sorry about the /lgtm |
@drubin