fastlane 2.156.1 → 2.157.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +82 -82
  3. data/deliver/lib/deliver.rb +1 -0
  4. data/deliver/lib/deliver/app_screenshot_iterator.rb +26 -29
  5. data/deliver/lib/deliver/detect_values.rb +4 -1
  6. data/deliver/lib/deliver/languages.rb +7 -0
  7. data/deliver/lib/deliver/loader.rb +4 -5
  8. data/deliver/lib/deliver/runner.rb +8 -5
  9. data/deliver/lib/deliver/upload_screenshots.rb +34 -17
  10. data/fastlane/lib/fastlane/actions/{.git_commit.rb.swp → .ensure_git_status_clean.rb.swp} +0 -0
  11. data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
  12. data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
  13. data/fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp +0 -0
  14. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +12 -8
  15. data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +120 -0
  16. data/fastlane/lib/fastlane/actions/commit_version_bump.rb +1 -1
  17. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +2 -0
  18. data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +17 -1
  19. data/fastlane/lib/fastlane/actions/download_dsyms.rb +89 -68
  20. data/fastlane/lib/fastlane/actions/set_changelog.rb +3 -2
  21. data/fastlane/lib/fastlane/actions/sonar.rb +5 -0
  22. data/fastlane/lib/fastlane/actions/spaceship_stats.rb +73 -0
  23. data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +4 -0
  24. data/fastlane/lib/fastlane/version.rb +1 -1
  25. data/fastlane/swift/Deliverfile.swift +1 -1
  26. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  27. data/fastlane/swift/Fastlane.swift +78 -18
  28. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  29. data/fastlane/swift/Gymfile.swift +1 -1
  30. data/fastlane/swift/GymfileProtocol.swift +1 -1
  31. data/fastlane/swift/Matchfile.swift +1 -1
  32. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  33. data/fastlane/swift/Precheckfile.swift +1 -1
  34. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  35. data/fastlane/swift/Scanfile.swift +1 -1
  36. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  37. data/fastlane/swift/Screengrabfile.swift +1 -1
  38. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  39. data/fastlane/swift/Snapshotfile.swift +1 -1
  40. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  41. data/fastlane_core/lib/fastlane_core/command_executor.rb +1 -0
  42. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +71 -42
  43. data/gym/lib/gym/error_handler.rb +1 -1
  44. data/match/lib/match/spaceship_ensure.rb +5 -5
  45. data/{fastlane/lib/fastlane/.erb_template_helper.rb.swp → pilot/lib/pilot/.manager.rb.swp} +0 -0
  46. data/pilot/lib/pilot/build_manager.rb +15 -4
  47. data/pilot/lib/pilot/manager.rb +15 -5
  48. data/pilot/lib/pilot/options.rb +16 -0
  49. data/produce/lib/produce/itunes_connect.rb +3 -2
  50. data/screengrab/lib/screengrab/runner.rb +29 -10
  51. data/sigh/lib/assets/resign.sh +9 -6
  52. data/sigh/lib/sigh/runner.rb +5 -4
  53. data/spaceship/lib/spaceship.rb +4 -0
  54. data/spaceship/lib/spaceship/client.rb +3 -0
  55. data/spaceship/lib/spaceship/connect_api.rb +1 -15
  56. data/spaceship/lib/spaceship/{.DS_Store → connect_api/.DS_Store} +0 -0
  57. data/spaceship/lib/spaceship/connect_api/api_client.rb +270 -0
  58. data/spaceship/lib/spaceship/connect_api/client.rb +155 -210
  59. data/spaceship/lib/spaceship/connect_api/file_uploader.rb +2 -0
  60. data/spaceship/lib/spaceship/connect_api/models/app.rb +5 -5
  61. data/spaceship/lib/spaceship/connect_api/models/app_price_point.rb +26 -0
  62. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +7 -1
  63. data/spaceship/lib/spaceship/connect_api/provisioning/client.rb +8 -17
  64. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +75 -64
  65. data/spaceship/lib/spaceship/connect_api/spaceship.rb +98 -0
  66. data/spaceship/lib/spaceship/connect_api/testflight/client.rb +8 -17
  67. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +288 -277
  68. data/spaceship/lib/spaceship/connect_api/token.rb +46 -5
  69. data/spaceship/lib/spaceship/connect_api/token_refresh_middleware.rb +24 -0
  70. data/spaceship/lib/spaceship/connect_api/tunes/client.rb +8 -17
  71. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +725 -706
  72. data/spaceship/lib/spaceship/connect_api/users/client.rb +8 -17
  73. data/spaceship/lib/spaceship/connect_api/users/users.rb +28 -17
  74. data/spaceship/lib/spaceship/stats_middleware.rb +65 -0
  75. metadata +33 -22
  76. data/spaceship/lib/spaceship/connect_api/.client.rb.swp +0 -0
@@ -1,245 +1,190 @@
1
- require_relative '../client'
2
- require_relative './response'
1
+ require_relative './token'
2
+ require_relative './provisioning/provisioning'
3
+ require_relative './testflight/testflight'
4
+ require_relative './tunes/tunes'
5
+ require_relative './users/users'
3
6
 
4
7
  module Spaceship
5
8
  class ConnectAPI
6
- class Client < Spaceship::Client
9
+ class Client
7
10
  attr_accessor :token
11
+ attr_accessor :tunes_client
12
+ attr_accessor :portal_client
8
13
 
9
- #####################################################
10
- # @!group Client Init
11
- #####################################################
12
-
13
- # Instantiates a client with cookie session or a JWT token.
14
- def initialize(cookie: nil, current_team_id: nil, token: nil)
15
- if token.nil?
16
- super(cookie: cookie, current_team_id: current_team_id, timeout: 1200)
17
- else
18
- options = {
19
- request: {
20
- timeout: (ENV["SPACESHIP_TIMEOUT"] || 300).to_i,
21
- open_timeout: (ENV["SPACESHIP_TIMEOUT"] || 300).to_i
22
- }
23
- }
24
- @token = token
25
- @current_team_id = current_team_id
26
-
27
- hostname = "https://api.appstoreconnect.apple.com/v1/"
28
-
29
- @client = Faraday.new(hostname, options) do |c|
30
- c.response(:json, content_type: /\bjson$/)
31
- c.response(:plist, content_type: /\bplist$/)
32
- c.use(FaradayMiddleware::RelsMiddleware)
33
- c.adapter(Faraday.default_adapter)
34
- c.headers["Authorization"] = "Bearer #{token.text}"
35
-
36
- if ENV['SPACESHIP_DEBUG']
37
- # for debugging only
38
- # This enables tracking of networking requests using Charles Web Proxy
39
- c.proxy = "https://127.0.0.1:8888"
40
- c.ssl[:verify_mode] = OpenSSL::SSL::VERIFY_NONE
41
- elsif ENV["SPACESHIP_PROXY"]
42
- c.proxy = ENV["SPACESHIP_PROXY"]
43
- c.ssl[:verify_mode] = OpenSSL::SSL::VERIFY_NONE if ENV["SPACESHIP_PROXY_SSL_VERIFY_NONE"]
44
- end
45
-
46
- if ENV["DEBUG"]
47
- puts("To run spaceship through a local proxy, use SPACESHIP_DEBUG")
48
- end
49
- end
50
- end
51
- end
52
-
53
- def self.hostname
54
- return nil
14
+ # Initializes client with Apple's App Store Connect JWT auth key.
15
+ #
16
+ # This method will automatically use the key id, issuer id, and filepath from environment
17
+ # variables if not given.
18
+ #
19
+ # All three parameters are needed to authenticate.
20
+ #
21
+ # @param key_id (String) (optional): The key id
22
+ # @param issuer_id (String) (optional): The issuer id
23
+ # @param filepath (String) (optional): The filepath
24
+ #
25
+ # @raise InvalidUserCredentialsError: raised if authentication failed
26
+ #
27
+ # @return (Spaceship::ConnectAPI::Client) The client the login method was called for
28
+ def self.auth(key_id: nil, issuer_id: nil, filepath: nil)
29
+ token = Spaceship::ConnectAPI::Token.create(key_id: key_id, issuer_id: issuer_id, filepath: filepath)
30
+ return ConnectAPI::Client.new(token: token)
55
31
  end
56
32
 
33
+ # Authenticates with Apple's web services. This method has to be called once
34
+ # to generate a valid session.
57
35
  #
58
- # Helpers
36
+ # This method will automatically use the username from the Appfile (if available)
37
+ # and fetch the password from the Keychain (if available)
59
38
  #
60
-
61
- def web_session?
62
- return @token.nil?
39
+ # @param user (String) (optional): The username (usually the email address)
40
+ # @param password (String) (optional): The password
41
+ # @param use_portal (Boolean) (optional): Whether to log in to Spaceship::Portal or not
42
+ # @param use_tunes (Boolean) (optional): Whether to log in to Spaceship::Tunes or not
43
+ # @param portal_team_id (String) (optional): The Spaceship::Portal team id
44
+ # @param tunes_team_id (String) (optional): The Spaceship::Tunes team id
45
+ # @param team_name (String) (optional): The team name
46
+ #
47
+ # @raise InvalidUserCredentialsError: raised if authentication failed
48
+ #
49
+ # @return (Spaceship::ConnectAPI::Client) The client the login method was called for
50
+ def self.login(user = nil, password = nil, use_portal: true, use_tunes: true, portal_team_id: nil, tunes_team_id: nil, team_name: nil)
51
+ portal_client = Spaceship::Portal.login(user, password) if use_portal
52
+ tunes_client = Spaceship::Tunes.login(user, password) if use_tunes
53
+
54
+ # Check if environment variables are set for Spaceship::Portal or Spaceship::Tunes to select team
55
+ portal_team_id ||= ENV['FASTLANE_TEAM_ID']
56
+ portal_team_name = team_name || ENV['FASTLANE_TEAM_NAME']
57
+ tunes_team_id ||= ENV['FASTLANE_ITC_TEAM_ID']
58
+ tunes_team_name = team_name || ENV['FASTLANE_ITC_TEAM_NAME']
59
+
60
+ # The clients will prompt for a team selection if:
61
+ # 1. client exists
62
+ # 2. team_id and team_name are nil and user belongs to multiple teams
63
+ portal_client.select_team(team_id: portal_team_id, team_name: portal_team_name) if portal_client
64
+ tunes_client.select_team(team_id: tunes_team_id, team_name: tunes_team_name) if tunes_client
65
+
66
+ return ConnectAPI::Client.new(tunes_client: tunes_client, portal_client: portal_client)
63
67
  end
64
68
 
65
- def build_params(filter: nil, includes: nil, limit: nil, sort: nil, cursor: nil)
66
- params = {}
67
-
68
- filter = filter.delete_if { |k, v| v.nil? } if filter
69
-
70
- params[:filter] = filter if filter && !filter.empty?
71
- params[:include] = includes if includes
72
- params[:limit] = limit if limit
73
- params[:sort] = sort if sort
74
- params[:cursor] = cursor if cursor
75
-
76
- return params
69
+ def initialize(cookie: nil, current_team_id: nil, token: nil, tunes_client: nil, portal_client: nil)
70
+ @token = token
71
+
72
+ # If using web session...
73
+ # Spaceship::Tunes is needed for TestFlight::API, Tunes::API, and Users::API
74
+ # Spaceship::Portal is needed for Provisioning::API
75
+ @tunes_client = tunes_client
76
+ @portal_client = portal_client
77
+
78
+ # Extending this instance to add API endpoints from these modules
79
+ # Each of these modules adds a new setter method for an instance
80
+ # of an ConnectAPI::APIClient
81
+ # These get set in set_indvidual_clients
82
+ self.extend(Spaceship::ConnectAPI::TestFlight::API)
83
+ self.extend(Spaceship::ConnectAPI::Tunes::API)
84
+ self.extend(Spaceship::ConnectAPI::Provisioning::API)
85
+ self.extend(Spaceship::ConnectAPI::Users::API)
86
+
87
+ set_indvidual_clients(
88
+ cookie: cookie,
89
+ current_team_id: current_team_id,
90
+ token: token,
91
+ tunes_client: @tunes_client,
92
+ portal_client: @portal_client
93
+ )
77
94
  end
78
95
 
79
- def get(url_or_path, params = nil)
80
- response = with_asc_retry do
81
- request(:get) do |req|
82
- req.url(url_or_path)
83
- req.options.params_encoder = Faraday::NestedParamsEncoder
84
- req.params = params if params
85
- req.headers['Content-Type'] = 'application/json'
86
- end
87
- end
88
- handle_response(response)
96
+ def portal_team_id
97
+ return nil if @portal_client.nil?
98
+ return @portal_client.team_id
89
99
  end
90
100
 
91
- def post(url_or_path, body, tries: 5)
92
- response = with_asc_retry(tries) do
93
- request(:post) do |req|
94
- req.url(url_or_path)
95
- req.body = body.to_json
96
- req.headers['Content-Type'] = 'application/json'
97
- end
98
- end
99
- handle_response(response)
101
+ def tunes_team_id
102
+ return nil if @tunes_client.nil?
103
+ return @tunes_client.team_id
100
104
  end
101
105
 
102
- def patch(url_or_path, body)
103
- response = with_asc_retry do
104
- request(:patch) do |req|
105
- req.url(url_or_path)
106
- req.body = body.to_json
107
- req.headers['Content-Type'] = 'application/json'
106
+ def in_house?
107
+ if token
108
+ if token.in_house.nil?
109
+ message = [
110
+ "Cannot determine if team is App Store or Enterprise via the App Store Connect API (yet)",
111
+ "Set 'in_house' on your Spaceship::ConnectAPI::Token",
112
+ "Or set 'in_house' in your App Store Connect API key JSON file",
113
+ "Or set the 'SPACESHIP_CONNECT_API_IN_HOUSE' environment variable to 'true'",
114
+ "View more info in the docs at https://docs.fastlane.tools/app-store-connect-api/"
115
+ ]
116
+ raise message.join('\n')
108
117
  end
118
+ return !!token.in_house
119
+ elsif @portal_client
120
+ return @portal_client.in_house?
121
+ else
122
+ raise "No App Store Connect API token or Portal Client set"
109
123
  end
110
- handle_response(response)
111
124
  end
112
125
 
113
- def delete(url_or_path, params = nil, body = nil)
114
- response = with_asc_retry do
115
- request(:delete) do |req|
116
- req.url(url_or_path)
117
- req.options.params_encoder = Faraday::NestedParamsEncoder if params
118
- req.params = params if params
119
- req.body = body.to_json if body
120
- req.headers['Content-Type'] = 'application/json' if body
121
- end
122
- end
123
- handle_response(response)
126
+ def select_team(portal_team_id: nil, tunes_team_id: nil, team_name: nil)
127
+ @portal_client.select_team(team_id: portal_team_id, team_name: team_name) unless @portal_client.nil?
128
+ @tunes_client.select_team(team_id: tunes_team_id, team_name: team_name) unless @tunes_client.nil?
129
+
130
+ # Updating the tunes and portal clients requires resetting
131
+ # of the clients in the API modules
132
+ set_indvidual_clients(
133
+ cookie: nil,
134
+ current_team_id: nil,
135
+ token: nil,
136
+ tunes_client: tunes_client,
137
+ portal_client: portal_client
138
+ )
124
139
  end
125
140
 
126
- protected
127
-
128
- def with_asc_retry(tries = 5, &_block)
129
- tries = 1 if Object.const_defined?("SpecHelper")
130
- response = yield
131
-
132
- status = response.status if response
141
+ private
133
142
 
134
- if [500, 504].include?(status)
135
- msg = "Timeout received! Retrying after 3 seconds (remaining: #{tries})..."
136
- raise msg
143
+ def set_indvidual_clients(cookie: nil, current_team_id: nil, token: nil, tunes_client: nil, portal_client: nil)
144
+ # This was added by Spaceship::ConnectAPI::TestFlight::API and is required
145
+ # to be set for API methods to have a client to send request on
146
+ if cookie || token || tunes_client
147
+ self.test_flight_request_client = Spaceship::ConnectAPI::TestFlight::Client.new(
148
+ cookie: cookie,
149
+ current_team_id: current_team_id,
150
+ token: token,
151
+ another_client: tunes_client
152
+ )
137
153
  end
138
154
 
139
- return response
140
- rescue => error
141
- tries -= 1
142
- puts(error) if Spaceship::Globals.verbose?
143
- if tries.zero?
144
- return response
145
- else
146
- retry
155
+ # This was added by Spaceship::ConnectAPI::Tunes::API and is required
156
+ # to be set for API methods to have a client to send request on
157
+ if cookie || token || tunes_client
158
+ self.tunes_request_client = Spaceship::ConnectAPI::Tunes::Client.new(
159
+ cookie: cookie,
160
+ current_team_id: current_team_id,
161
+ token: token,
162
+ another_client: tunes_client
163
+ )
147
164
  end
148
- end
149
165
 
150
- def handle_response(response)
151
- if (200...300).cover?(response.status) && (response.body.nil? || response.body.empty?)
152
- return
166
+ # This was added by Spaceship::ConnectAPI::Provisioning::API and is required
167
+ # to be set for API methods to have a client to send request on
168
+ if cookie || token || portal_client
169
+ self.provisioning_request_client = Spaceship::ConnectAPI::Provisioning::Client.new(
170
+ cookie: cookie,
171
+ current_team_id: current_team_id,
172
+ token: token,
173
+ another_client: portal_client
174
+ )
153
175
  end
154
176
 
155
- raise InternalServerError, "Server error got #{response.status}" if (500...600).cover?(response.status)
156
-
157
- unless response.body.kind_of?(Hash)
158
- raise UnexpectedResponse, response.body
177
+ # This was added by Spaceship::ConnectAPI::Users::API and is required
178
+ # to be set for API methods to have a client to send request on
179
+ if cookie || token || tunes_client
180
+ self.users_request_client = Spaceship::ConnectAPI::Users::Client.new(
181
+ cookie: cookie,
182
+ current_team_id: current_team_id,
183
+ token: token,
184
+ another_client: tunes_client
185
+ )
159
186
  end
160
-
161
- raise UnexpectedResponse, response.body['error'] if response.body['error']
162
-
163
- raise UnexpectedResponse, handle_errors(response) if response.body['errors']
164
-
165
- raise UnexpectedResponse, "Temporary App Store Connect error: #{response.body}" if response.body['statusCode'] == 'ERROR'
166
-
167
- store_csrf_tokens(response)
168
-
169
- return Spaceship::ConnectAPI::Response.new(body: response.body, status: response.status, client: self)
170
- end
171
-
172
- def handle_errors(response)
173
- # Example error format
174
- # {
175
- # "errors":[
176
- # {
177
- # "id":"cbfd8674-4802-4857-bfe8-444e1ea36e32",
178
- # "status":"409",
179
- # "code":"STATE_ERROR",
180
- # "title":"The request cannot be fulfilled because of the state of another resource.",
181
- # "detail":"Submit for review errors found.",
182
- # "meta":{
183
- # "associatedErrors":{
184
- # "/v1/appScreenshots/":[
185
- # {
186
- # "id":"23d1734f-b81f-411a-98e4-6d3e763d54ed",
187
- # "status":"409",
188
- # "code":"STATE_ERROR.SCREENSHOT_REQUIRED.APP_WATCH_SERIES_4",
189
- # "title":"App screenshot missing (APP_WATCH_SERIES_4)."
190
- # },
191
- # {
192
- # "id":"db993030-0a93-48e9-9fd7-7e5676633431",
193
- # "status":"409",
194
- # "code":"STATE_ERROR.SCREENSHOT_REQUIRED.APP_WATCH_SERIES_4",
195
- # "title":"App screenshot missing (APP_WATCH_SERIES_4)."
196
- # }
197
- # ],
198
- # "/v1/builds/d710b6fa-5235-4fe4-b791-2b80d6818db0":[
199
- # {
200
- # "id":"e421fe6f-0e3b-464b-89dc-ba437e7bb77d",
201
- # "status":"409",
202
- # "code":"ENTITY_ERROR.ATTRIBUTE.REQUIRED",
203
- # "title":"The provided entity is missing a required attribute",
204
- # "detail":"You must provide a value for the attribute 'usesNonExemptEncryption' with this request",
205
- # "source":{
206
- # "pointer":"/data/attributes/usesNonExemptEncryption"
207
- # }
208
- # }
209
- # ]
210
- # }
211
- # }
212
- # }
213
- # ]
214
- # }
215
-
216
- return response.body['errors'].map do |error|
217
- messages = [[error['title'], error['detail']].compact.join(" - ")]
218
-
219
- meta = error["meta"] || {}
220
- associated_errors = meta["associatedErrors"] || {}
221
-
222
- messages + associated_errors.values.flatten.map do |associated_error|
223
- [[associated_error["title"], associated_error["detail"]].compact.join(" - ")]
224
- end
225
- end.flatten.join("\n")
226
- end
227
-
228
- private
229
-
230
- def local_variable_get(binding, name)
231
- if binding.respond_to?(:local_variable_get)
232
- binding.local_variable_get(name)
233
- else
234
- binding.eval(name.to_s)
235
- end
236
- end
237
-
238
- def provider_id
239
- return team_id if self.provider.nil?
240
- self.provider.provider_id
241
187
  end
242
188
  end
243
189
  end
244
- # rubocop:enable Metrics/ClassLength
245
190
  end
@@ -4,6 +4,8 @@ require 'faraday_middleware'
4
4
 
5
5
  require 'spaceship/globals'
6
6
 
7
+ require 'openssl'
8
+
7
9
  module Spaceship
8
10
  class ConnectAPI
9
11
  module FileUploader
@@ -192,7 +192,7 @@ module Spaceship
192
192
  .last
193
193
  end
194
194
 
195
- def get_live_app_store_version(platform: nil, includes: nil)
195
+ def get_live_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)
196
196
  platform ||= Spaceship::ConnectAPI::Platform::IOS
197
197
  filter = {
198
198
  appStoreState: Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::READY_FOR_SALE,
@@ -201,7 +201,7 @@ module Spaceship
201
201
  return get_app_store_versions(filter: filter, includes: includes).first
202
202
  end
203
203
 
204
- def get_edit_app_store_version(platform: nil, includes: nil)
204
+ def get_edit_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)
205
205
  platform ||= Spaceship::ConnectAPI::Platform::IOS
206
206
  filter = {
207
207
  appStoreState: [
@@ -221,7 +221,7 @@ module Spaceship
221
221
  .last
222
222
  end
223
223
 
224
- def get_in_review_app_store_version(platform: nil, includes: nil)
224
+ def get_in_review_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)
225
225
  platform ||= Spaceship::ConnectAPI::Platform::IOS
226
226
  filter = {
227
227
  appStoreState: Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::IN_REVIEW,
@@ -230,7 +230,7 @@ module Spaceship
230
230
  return get_app_store_versions(filter: filter, includes: includes).first
231
231
  end
232
232
 
233
- def get_pending_release_app_store_version(platform: nil, includes: nil)
233
+ def get_pending_release_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)
234
234
  platform ||= Spaceship::ConnectAPI::Platform::IOS
235
235
  filter = {
236
236
  appStoreState: Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::PENDING_DEVELOPER_RELEASE,
@@ -239,7 +239,7 @@ module Spaceship
239
239
  return get_app_store_versions(filter: filter, includes: includes).first
240
240
  end
241
241
 
242
- def get_app_store_versions(filter: {}, includes: nil, limit: nil, sort: nil)
242
+ def get_app_store_versions(filter: {}, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES, limit: nil, sort: nil)
243
243
  resps = Spaceship::ConnectAPI.get_app_store_versions(app_id: id, filter: filter, includes: includes, limit: limit, sort: sort).all_pages
244
244
  return resps.flat_map(&:to_models)
245
245
  end