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

+10
View File
@@ -250,4 +250,14 @@ struct GiteaClient {
func rerun(owner: String, repo: String, runID: Int64) async throws {
try await postNoBody("repos/\(owner)/\(repo)/actions/runs/\(runID)/rerun")
}
/// Raw log text for a single job (from `/actions/jobs/{job_id}/logs`).
/// The response is plain text, not JSON.
func jobLogs(owner: String, repo: String, jobID: Int64) async throws -> String {
let data = try await request("repos/\(owner)/\(repo)/actions/jobs/\(jobID)/logs")
guard let text = String(data: data, encoding: .utf8) else {
throw APIError.invalidResponse
}
return text
}
}