spaceship/lib/spaceship/connect_api/testflight/testflight.rb in fastlane-2.149.1 vs spaceship/lib/spaceship/connect_api/testflight/testflight.rb in fastlane-2.150.0.rc1
- old
+ new
@@ -283,12 +283,19 @@
def get_builds(filter: {}, includes: "buildBetaDetail,betaBuildMetrics", limit: 10, sort: "uploadedDate", cursor: nil)
params = Client.instance.build_params(filter: filter, includes: includes, limit: limit, sort: sort, cursor: cursor)
Client.instance.get("builds", params)
end
- def get_build(build_id: nil, includes: nil)
- params = Client.instance.build_params(filter: nil, includes: includes, limit: nil, sort: nil, cursor: nil)
- Client.instance.get("builds/#{build_id}", params)
+ def get_build(build_id: nil, app_store_version_id: nil, includes: nil)
+ if build_id
+ params = Client.instance.build_params(filter: nil, includes: includes, limit: nil, sort: nil, cursor: nil)
+ return Client.instance.get("builds/#{build_id}", params)
+ elsif app_store_version_id
+ params = Client.instance.build_params(filter: nil, includes: includes, limit: nil, sort: nil, cursor: nil)
+ return Client.instance.get("appStoreVersions/#{app_store_version_id}/build", params)
+ else
+ return nil
+ end
end
def patch_builds(build_id: nil, attributes: {})
body = {
data: {