-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds ability to fetch all builds for a workflow
- Loading branch information
1 parent
351ac5d
commit cff8a26
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Foundation | ||
|
||
public struct Build { | ||
let number: Int? | ||
let id: String | ||
let createdAt: Date? | ||
let endedAt: Date? | ||
let startedAt: Date? | ||
} |
14 changes: 14 additions & 0 deletions
14
Sources/XcodeCloudKit/Workflow/RequestBuilder+Workflow.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import AppStoreConnect_Swift_SDK | ||
|
||
extension RequestBuilder { | ||
static func allBuilds(for workflowId: String) -> TransportRequest<CiBuildRunsResponse> { | ||
let endpoint = APIEndpoint | ||
.v1 | ||
.ciWorkflows | ||
.id(workflowId) | ||
.buildRuns | ||
.get() | ||
|
||
return .init(path: endpoint.path, method: endpoint.method, queryParameters: endpoint.query) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters