Skip to content
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 basic support for retrieving TestFlight Feedback screenshots via ConnectAPI #15793

Merged
merged 3 commits into from Dec 19, 2019
Merged

Conversation

max-ott
Copy link
Contributor

@max-ott max-ott commented Dec 10, 2019

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

Adds basic support for retrieving TestFlight Feedback (screenshots, comments, etc.) with regards to #15771

⚠️Even though this uses the App Store Connect API through ConnectAPI, this is not a documented and public feature of the API.

Testing Steps

lane :connect_feedback do
  fastlane_require 'spaceship'

  Spaceship::Tunes.login
  Spaceship::Tunes.select_team

  # Gets app
  app = Spaceship::ConnectAPI::App.find(ENV["TEST_APP_BUNDLE"])

  # Gets feedback for an app (default includes screenshots and tester info)
  feedbacks = app.get_beta_feedback

  # Iterate over feedbacks
  feedbacks.each do |feedback|
    puts ""
    puts "comment: #{feedback.comment}"
    puts "name: #{feedback.tester.first_name} #{feedback.tester.last_name}"
    puts "email: #{feedback.tester.email}"
    puts "build: #{feedback.build.version}"

    # Iterate over feedback screenshots
    feedback.screenshots.each do |screenshot|

      # screenshot.image_assets is an array of different resolults of a screenshots
      image_asset = screenshot.image_assets.first

      puts "\turl: #{image_asset["url"]}"
      puts "\twidth: #{image_asset["width"]}"
      puts "\theight: #{image_asset["height"]}"
    end
  end
end
[21:32:34]: Driving the lane 'connect_feedback'
[21:32:42]:
[21:32:42]:comment: And more feedback
[21:32:42]:name: Josh Holtz
[21:32:42]:email: josh+dev@rokkincat.com
[21:32:42]:build: 1571678363
[21:32:42]:
[21:32:42]:comment: Oohhhhh feedback!!!!
[21:32:42]:name: Josh Holtz
[21:32:42]:email: email@email.com
[21:32:42]:build: 1571678363
[21:32:42]:     url: https://tf-feedback.itunes.apple.com/blahblahblah
[21:32:42]:     width: 3024
[21:32:42]:     height: 4032

@joshdholtz joshdholtz changed the title Add basic support for retrieving TestFlight Feedback screenshots via ConnectAPI [spaceship] add basic support for retrieving TestFlight Feedback screenshots via ConnectAPI Dec 11, 2019
@googlebot
Copy link

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@joshdholtz
Copy link
Member

@googlebot I consent.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@joshdholtz
Copy link
Member

@max-ott Updated this with some tests, model helpers, and new screenshot model. Do you mind taking a look when you have time? 😊

Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing the work on this PR! Really appreciate it like always 😊❤️

@joshdholtz joshdholtz merged commit cef44e7 into fastlane:master Dec 19, 2019
@fastlane-bot
Copy link

Congratulations! 🎉 This was released as part of fastlane 2.138.0 🚀

@fastlane fastlane locked and limited conversation to collaborators Feb 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants