import Foundation /// A Gitea Actions workflow run, from /// `/repos/{owner}/{repo}/actions/runs?head_sha=...`. struct ActionRun: Codable, Identifiable { struct Workflow: Codable { let id: Int64? let name: String? let headBranch: String? } let id: Int64 let name: String? // workflow file name (e.g. "Build iOS App") let workflowId: Int64? let headBranch: String? let headSha: String? let status: String? // waiting | running | success | failure | cancelled let conclusion: String? // null while running, else success/failure/etc. let createdAt: Date? let updatedAt: Date? enum CodingKeys: String, CodingKey { case id, name case workflowId = "workflow_id" case headBranch = "head_branch" case headSha = "head_sha" case status, conclusion case createdAt = "created_at" case updatedAt = "updated_at" } } /// A job within a run, from `/repos/{owner}/{repo}/actions/runs/{id}/jobs`. struct ActionJob: Codable, Identifiable { let id: Int64 let name: String let status: String // queued | running | success | failure | cancelled let conclusion: String? let startedAt: Date? let completedAt: Date? enum CodingKeys: String, CodingKey { case id, name, status, conclusion case startedAt = "started_at" case completedAt = "completed_at" } }