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
Update cluster cmd #1487
Update cluster cmd #1487
Conversation
378d05b
to
22d786a
Compare
cmd/internal/provider.go
Outdated
} | ||
|
||
token = generatedToken | ||
return "", fmt.Errorf(missingTokenErr, tokenVarName) | ||
} else if err != nil { |
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.
Is this redundant because we've already checked for err
above? 🤔
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.
The above just gets the env var name. So GITHUB vs GITLAB. The second one checks if that var is empty or not.
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.
But lookupEnvFunc
doesn't set err
, so this case is still pointless, right? It was redundant before too, though.
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.
Oh yeah I looked at the wrong err. Yeah this is redundant.
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.
If pesto is happy, I'm happy.
* Remove auth flow from cluster add/delete * fix lint error * remove redundant code Co-authored-by: Justin Thompson <jpthomp12@gmail.com>
* Remove auth flow from cluster add/delete * fix lint error * remove redundant code Co-authored-by: Justin Thompson <jpthomp12@gmail.com>
What changed?
Removed the auth flow from cluster add/delete cmd's. Core is removing git auth but enterprise still needs a git token to create PR's. For now I have left in getting the token from the env variable. I also left in all the code for gitProvider. It isnt needed for add/delete but profiles is using it and that is a problem for another task.
Why?
How did you test it?
Release notes
Documentation Changes