Skip to content

Commit a590c0a

Browse files
committed
Fixes issue in SDK by creating a custom decodable struct
1 parent 8fc8e9b commit a590c0a

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

Sources/XcodeCloudKit/Workflow/RequestBuilder+Workflow.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
import AppStoreConnect_Swift_SDK
2+
import Foundation
3+
#if canImport(FoundationNetworking)
4+
import FoundationNetworking
5+
#endif
6+
7+
struct StartWorkflowResponse: Decodable {
8+
let data: DataClass
9+
10+
struct DataClass: Decodable {
11+
let id: String
12+
}
13+
}
214

315
extension RequestBuilder {
416
static func allBuilds(for workflowId: String) -> TransportRequest<CiBuildRunsResponse> {
@@ -12,7 +24,7 @@ extension RequestBuilder {
1224
return .init(path: endpoint.path, method: endpoint.method, queryParameters: endpoint.query)
1325
}
1426

15-
static func startWorkflow(withId id: String, andGitReferenceId gitReferenceId: String) -> TransportRequest<CiBuildRunResponse> {
27+
static func startWorkflow(withId id: String, andGitReferenceId gitReferenceId: String) -> TransportRequest<StartWorkflowResponse> {
1628
let requestRelationships = CiBuildRunCreateRequest
1729
.Data
1830
.Relationships(

0 commit comments

Comments
 (0)