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
[spaceship] Add ability to create a beta group to Spaceship #16180
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
43ea563
to
5b7dde2
Compare
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
All (the pull request submitter and all commit authors) CLAs are signed, but 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 by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@googlebot I consent. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
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.
Thanks for doing this! I added a commit to change the name of the arguments to be named with _
. Appreciate the contribution ❤️
Hey @chrisjwindisch 👋 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 👍 |
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.
Congratulations! 🎉 This was released as part of fastlane 2.144.0 🚀
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validMotivation and Context
The Spaceship::TestFlight::Group endpoint is no longer being maintained since the conversion to the ConnectAPI. As a result there's no way to create beta groups for test flight using Spaceship.
#15810
Though I couldn't find documentation, the method
Spaceship::ConnectAPI::App.find("YOUR_BUNDLE_ID").get_beta_groups
works to list the groups, but you can't create a new group, which is what this commit enables.Description
I've created a method that creates a beta test group for TestFlight.
To do this, I've added a create_beta_group() method to the Spaceship::ConnectAPI::App object which calls another new method called Spaceship::ConnectAPI::create_beta_group(), which makes a post request to https://api.appstoreconnect.apple.com/v1/betaGroups
(https://developer.apple.com/documentation/appstoreconnectapi/create_a_beta_group#http-body)
The group_name must be provided, publicLinkEnabled defaults to false, publicLinkLimit defaults to the max of 10_000, publicLinkLimitEnabled defaults to false. I'm not sure these are the right defaults, please give me your feedback if I should change them.
Finally, I've added a test case and fixture to stubb the api call.
Note: I did not update any documentation. If there's a place to show examples for Spaceship please point me to it and I'll update it.
I've added a test case that can be run with
bundle exec rspec spaceship
The easiest way to test it on an actual app is from the spaceship playground. From your app's project directory run:
bundle exec fastlane spaceship
From the resulting prompt run:
You can verify the group was created from the Apple Developer portal by:
You can also check that the group was created from the spaceship playground:
Testing Steps