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
added team_name
to spaceship client
#12457
Conversation
@joshdholtz Please take a look whenever you get a chance. |
spaceship/lib/spaceship/client.rb
Outdated
end | ||
|
||
# Set a new team Name which will be used from now on | ||
def team_name=(team_name) |
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.
I totes see the use case for the team_name
but do we really need team_name=
? Selected with a team name should be possible with existing functionality in select_team(team_id: nil, team_name: nil)
, right?
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.
@joshdholtz I don't think we really need team_name=
. It's a nice to have since we have team_id=
. We could definitely use select_team()
function to set the team_name
.
Feel free to reject this PR. 😄
If you think about it we don't even need team_id=
as well. If not, I can remove that code. LMK.
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.
@RishabhTayal We totally need team_id=
still for backwards compatibility which is why I didn't recommend deleting that 🙃 But if we could 💣 that team_name=
I think this PR is valid to add a team_name
attribute/method
spaceship/lib/spaceship/client.rb
Outdated
puts("The current user is in #{teams.count} teams. Pass a team Name or call `select_team` to choose a team. Using the first one for now.") | ||
end | ||
@current_team_name ||= teams[0]['contentProvider']['name'] | ||
end |
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.
@RishabhTayal Now that I think about this, we should probably 💣 @current_team_name
and replace it as a method that looks up from teams
based on @current_team_id
@joshdholtz it's ready to review again. |
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.
Can we add some tests for this? 🙃
Not sure what kind of tests we can add for this. I don't see any tests written for |
@joshdholtz I am not sure this is applicable here. The test you pointed out is for |
@joshdholtz I have added the tests, however it's failing now. Could you help me get those tests passed? |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
@RishabhTayal Updated ^ |
@joshdholtz could you sign the CLA? 😝🤣🤣 |
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.
💪 🚀
Hey @RishabhTayal 👋 Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉 Please let us know if this change requires an immediate release by adding a comment here 👍 |
Congratulations! 🎉 This was released as part of fastlane 2.96.0 🚀 |
Currently the spaceship client doesn't contain a function to set the
team_name
from iTC. There is aselect_team
function. However I think it would be better if there is ateam_name
function similar toteam_id
to set the name.