GiteaPR: native iOS app to manage Gitea pull requests
Build iOS App / Build .ipa and publish source (push) Failing after 35s

Multi-repo PR inbox, review (approve/request changes/comment), merge with
gating toggle, read-only diff viewer, and Gitea Actions check status with
one-tap re-run. Ships unsigned via the iMac runner to the SideStore source.
This commit is contained in:
Hermes committed 2026-08-12 17:07:58 +00:00
commit 1025634978
27 files changed
+2322

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
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"
}
}
+16
View File
@@ -0,0 +1,16 @@
import Foundation
/// One file changed by a PR, from `/repos/{owner}/{repo}/pulls/{index}/files`.
struct ChangedFile: Codable, Identifiable, Hashable {
let filename: String
let status: String? // added | removed | modified | renamed
let additions: Int
let deletions: Int
let patch: String? // unified diff hunks (only for small diffs)
var id: String { filename }
enum CodingKeys: String, CodingKey {
case filename, status, additions, deletions, patch
}
}
+103
View File
@@ -0,0 +1,103 @@
import Foundation
struct Branch: Codable, Hashable {
let label: String?
let ref: String?
let sha: String?
}
struct Label: Codable, Hashable, Identifiable {
let id: Int64?
let name: String
let color: String?
}
struct PRUser: Codable, Hashable {
let id: Int64?
let login: String
let fullName: String?
}
/// A pull request as returned by `/repos/{owner}/{repo}/pulls` and
/// `/issues/{index}`.
struct PullRequest: Codable, Hashable, Identifiable {
let id: Int64
let number: Int
let title: String
let body: String?
let state: String // open | closed | merged
let htmlURL: String?
let diffURL: String?
let patchURL: String?
let user: PRUser?
let assignees: [PRUser]?
let labels: [Label]?
let head: Branch?
let base: Branch?
let createdAt: Date?
let updatedAt: Date?
let merged: Bool?
let mergeable: Bool?
let draft: Bool?
enum CodingKeys: String, CodingKey {
case id, number, title, body, state, user, assignees, labels
case htmlURL = "html_url"
case diffURL = "diff_url"
case patchURL = "patch_url"
case head, base
case createdAt = "created_at"
case updatedAt = "updated_at"
case merged, mergeable, draft
}
}
/// A single review submission (approve / request changes / comment).
struct PullReview: Codable, Identifiable {
let id: Int64
let state: String // APPROVED | REQUEST_CHANGES | COMMENT | PENDING
let body: String?
let user: PRUser?
let submittedAt: Date?
enum CodingKeys: String, CodingKey {
case id, state, body, user
case submittedAt = "submitted_at"
}
}
/// An issue/PR comment.
struct IssueComment: Codable, Identifiable {
let id: Int64
let body: String?
let user: PRUser?
let createdAt: Date?
let updatedAt: Date?
enum CodingKeys: String, CodingKey {
case id, body, user
case createdAt = "created_at"
case updatedAt = "updated_at"
}
}
/// A commit in a pull request.
struct PRCommit: Codable, Identifiable {
struct Meta: Codable {
let sha: String?
let message: String?
}
struct Author: Codable {
let name: String?
let email: String?
let login: String?
}
let id: String // sha
let sha: String?
let commit: Meta?
let author: Author?
enum CodingKeys: String, CodingKey {
case id, sha, commit, author
}
}
+28
View File
@@ -0,0 +1,28 @@
import Foundation
/// A GitHub/Gitea style owner (user or organization).
struct Owner: Codable, Hashable {
let id: Int64?
let login: String
let fullName: String?
}
/// A repository as returned by `/user/repos`.
struct Repository: Codable, Hashable, Identifiable {
let id: Int64
let name: String
let fullName: String
let owner: Owner
let `private`: Bool?
let htmlURL: String?
let defaultBranch: String?
enum CodingKeys: String, CodingKey {
case id, name
case fullName = "full_name"
case owner
case `private`
case htmlURL = "html_url"
case defaultBranch = "default_branch"
}
}