Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 804 Bytes

README.md

File metadata and controls

33 lines (25 loc) · 804 Bytes

xcode-cloud-webhook

Implements a system to process Xcode Cloud webhook events. This package is designed to work well with Swift on the Server, including Vapor and AWS Lamba.

Get Started

Implement a type which conforms to XcodeCloudWebhookHandler:

struct Handler: XcodeCloudWebhookHandler {
    func run(with payload: Payload) async throws {
        Task {
            try await Task.sleep(nanoseconds: 1_000_000_000)
            print("\(payload)")
        }
    }
}

Add the handler to the webhook runner:

let webhook = XcodeCloudWebhook()
await webhook.add(Handler())

Run the webhook:

try await webhook.run(payload)