Closed valeriangalliat closed 2 years ago
Thanks, @valeriangalliat! Could we make that backward compatible? I would also make sure to document in it the readme and our CLI Ref.
Definitely, that would be a good exercise to practice my Go. 😄
Basically if teamName == displayName
query API to get real team name.
That's the fancy solution, alternatively, the command could only print "Logged in as %" omitting the workspace
@alexbouchardd I couldn't do that because there's 150 legit users who have a workspace with the same name!
In that case the GetTeamName
function calls the /poll
endpoint again to get back the team name (it's the only endpoint allowed for a CLI token to return the team name) and refreshes it in the config.
@leetrout I'm learning Go so I would love if you give me a pretty strict review!
Sounds good!
in most Go code the error check is considered part of the logical block where it is assigned and there isn't a blank line between them
Good to know!
I don't remember what was the channel leak thing but ping me when you want to work on it, I'm definitely interested :)
I was wondering what workspace I logged in with the CLI locally and found it would be useful to have a
hookdeck whoami
command to quickly be able to tell.This PR adds
hookdeck whoami
.I realized we currently were setting
DisplayName
in the config fieldteam_name
so the command will not show the proper team name for the previously logged-in users until they reauthenticate.