Commit cb52a04ea9
Verified · cmc
Layout: unified · split
gitbay/Builds/BuildModels.swift +2 −2
| @@ -22,8 +22,8 @@ nonisolated struct Build: Decodable, Sendable, Hashable, Identifiable { | |||
| 22 | 22 | ||
| 23 | var id: Int64 { number } | 23 | var id: Int64 { number } |
| 24 | var shortSHA: String { String(sha.prefix(10)) } | 24 | var shortSHA: String { String(sha.prefix(10)) } |
| 25 | /// What a row leads with. Recognising a build by its sha meant | 25 | /// What a row leads with. A sha alone does not say what was built |
| 26 | /// opening the commit or already knowing it (krz/gitbay#241). | 26 | /// (krz/gitbay#241). |
| 27 | var title: String { | 27 | var title: String { |
| 28 | if let subject, !subject.isEmpty { return "#\(number) \(subject)" } | 28 | if let subject, !subject.isEmpty { return "#\(number) \(subject)" } |
| 29 | return "#\(number) \(shortSHA)" | 29 | return "#\(number) \(shortSHA)" |
gitbayTests/IssueBuildViewModelTests.swift +3 −3
| @@ -173,9 +173,9 @@ struct BuildListViewModelTests { | |||
| 173 | filter.status = .failure | 173 | filter.status = .failure |
| 174 | filter.job = "test" | 174 | filter.job = "test" |
| 175 | model.filter = filter | 175 | model.filter = filter |
| 176 | // `load()` leaves the previous list showing until the reply lands | 176 | // The reload runs in a Task that has not started when `filter` is |
| 177 | // rather than blanking it, so a "not loading" check would pass | 177 | // assigned, so a "not loading" check would pass before it finished: |
| 178 | // before the reload finished: wait for the result itself. | 178 | // wait for the result itself. |
| 179 | await until { | 179 | await until { |
| 180 | if case .empty = model.state { return true } | 180 | if case .empty = model.state { return true } |
| 181 | return false | 181 | return false |