Fix commits tab + add CI job logs; bump to 1.7
Build iOS App / Build .ipa and publish source (push) Successful in 21s

Commits tab was empty: Gitea PR commits have no 'id' field (only sha), but
PRCommit.id was a non-optional let decoded from 'id', so decoding [PRCommit]
always threw and the tab silently showed nothing. Make PRCommit.id a computed
sha-based identity so the array decodes and renders.

CI: add a Logs button per job that fetches the job's raw log text
(/actions/jobs/{id}/logs) into a viewable, shareable screen. Bump to 1.7.
This commit is contained in:
Hermes committed 2026-08-12 21:55:24 +00:00
1 parent a3b8eefdb2
commit 9f3fb95cbe
5 files changed
+95 -9

No files matched your search

+7 -5
View File
@@ -82,22 +82,24 @@ struct IssueComment: Codable, Identifiable {
}
/// A commit in a pull request.
struct PRCommit: Codable, Identifiable {
struct Meta: Codable {
struct PRCommit: Codable, Hashable, Identifiable {
struct Meta: Codable, Hashable {
let sha: String?
let message: String?
}
struct Author: Codable {
struct Author: Codable, Hashable {
let name: String?
let email: String?
let login: String?
}
let id: String // sha
let sha: String?
let commit: Meta?
let author: Author?
/// Gitea's PR commits have no `id` field — only `sha`. Use sha as the
/// identity so the array decodes and SwiftUI can key rows on it.
var id: String { sha ?? commit?.sha ?? "\(author?.name ?? "")-\(commit?.message?.hashValue ?? 0)" }
enum CodingKeys: String, CodingKey {
case id, sha, commit, author
case sha, commit, author
}
}