Update danger message and brew dependencies. (#683)

This commit is contained in:
Doug
2023-03-08 10:59:49 +00:00
committed by GitHub
parent d3b304e92e
commit 7d35876753
8 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ if let ticketNumberRegex = try? NSRegularExpression(pattern: "#\\d+") {
}.isEmpty }.isEmpty
if missingTicketNumber { if missingTicketNumber {
warn("Some of the commits are missing ticket numbers. Please consinder using them for better tracking.") warn("Some of the commits are missing ticket numbers. Please consider squashing all commits that don't have a tracking number.")
} }
} }
+1 -1
View File
@@ -53,7 +53,7 @@ public extension Task where Success == Never, Failure == Never {
try await withCheckedThrowingContinuation(function: function) { continuation in try await withCheckedThrowingContinuation(function: function) { continuation in
queue.async { queue.async {
do { do {
continuation.resume(returning: try body()) try continuation.resume(returning: body())
} catch { } catch {
continuation.resume(throwing: error) continuation.resume(throwing: error)
} }
@@ -243,7 +243,7 @@ private extension Data {
case .file(let url): case .file(let url):
appendString(string: "; filename=\"\(url.lastPathComponent)\"\r\n") appendString(string: "; filename=\"\(url.lastPathComponent)\"\r\n")
appendString(string: "Content-Type: \"content-type header\"\r\n\r\n") appendString(string: "Content-Type: \"content-type header\"\r\n\r\n")
append(try Data(contentsOf: url)) try append(Data(contentsOf: url))
appendString(string: "\r\n") appendString(string: "\r\n")
} }
} }
@@ -47,7 +47,7 @@ class ScreenshotDetector {
findScreenshot() findScreenshot()
} else if authStatus == .notDetermined, autoRequestPHAuthorization { } else if authStatus == .notDetermined, autoRequestPHAuthorization {
Task { Task {
self.handleAuthStatus(await PHPhotoLibrary.requestAuthorization(for: .readWrite)) await self.handleAuthStatus(PHPhotoLibrary.requestAuthorization(for: .readWrite))
} }
} else { } else {
fail(withError: ScreenshotDetectorError.notAuthorized) fail(withError: ScreenshotDetectorError.notAuthorized)
@@ -24,12 +24,12 @@ struct RestorationToken: Codable, Equatable {
extension MatrixRustSDK.Session: Codable { extension MatrixRustSDK.Session: Codable {
public init(from decoder: Decoder) throws { public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self) let container = try decoder.container(keyedBy: CodingKeys.self)
self = .init(accessToken: try container.decode(String.self, forKey: .accessToken), self = try .init(accessToken: container.decode(String.self, forKey: .accessToken),
refreshToken: try container.decodeIfPresent(String.self, forKey: .refreshToken), refreshToken: container.decodeIfPresent(String.self, forKey: .refreshToken),
userId: try container.decode(String.self, forKey: .userId), userId: container.decode(String.self, forKey: .userId),
deviceId: try container.decode(String.self, forKey: .deviceId), deviceId: container.decode(String.self, forKey: .deviceId),
homeserverUrl: try container.decode(String.self, forKey: .homeserverUrl), homeserverUrl: container.decode(String.self, forKey: .homeserverUrl),
slidingSyncProxy: try container.decode(String.self, forKey: .slidingSyncProxy)) slidingSyncProxy: container.decode(String.self, forKey: .slidingSyncProxy))
} }
public func encode(to encoder: Encoder) throws { public func encode(to encoder: Encoder) throws {
@@ -108,7 +108,7 @@ class NotificationServiceExtension: UNNotificationServiceExtension {
// There is some media to load, process it again // There is some media to load, process it again
if let latestContent = try await itemProxy.process(with: roomId, if let latestContent = try await itemProxy.process(with: roomId,
mediaProvider: try createMediaProvider(with: credentials)) { mediaProvider: createMediaProvider(with: credentials)) {
// Processing finished, hopefully with some media // Processing finished, hopefully with some media
modifiedContent = latestContent modifiedContent = latestContent
return notify() return notify()
@@ -51,12 +51,12 @@ extension UNMutableNotificationContent {
case .success(let url): case .success(let url):
// Initialize only the sender for a one-to-one message intent. // Initialize only the sender for a one-to-one message intent.
let handle = INPersonHandle(value: senderId, type: .unknown) let handle = INPersonHandle(value: senderId, type: .unknown)
let sender = INPerson(personHandle: handle, let sender = try INPerson(personHandle: handle,
nameComponents: nil, nameComponents: nil,
displayName: senderName, displayName: senderName,
image: INImage(imageData: try Data(contentsOf: url)), image: INImage(imageData: Data(contentsOf: url)),
contactIdentifier: nil, contactIdentifier: nil,
customIdentifier: nil) customIdentifier: nil)
// Because this communication is incoming, you can infer that the current user is // Because this communication is incoming, you can infer that the current user is
// a recipient. Don't include the current user when initializing the intent. // a recipient. Don't include the current user when initializing the intent.
+2 -2
View File
@@ -30,7 +30,7 @@ setup_xcode_cloud_environment () {
} }
install_xcode_cloud_brew_dependencies () { install_xcode_cloud_brew_dependencies () {
brew install xcodegen imagemagick brew update && install xcodegen imagemagick
} }
install_xcode_cloud_python_dependencies () { install_xcode_cloud_python_dependencies () {
@@ -38,7 +38,7 @@ install_xcode_cloud_python_dependencies () {
} }
setup_github_actions_environment() { setup_github_actions_environment() {
brew install xcodegen swiftformat git-lfs brew update && brew install xcodegen swiftformat git-lfs
# brew "swiftlint" # Fails on the CI: `Target /usr/local/bin/swiftlint Target /usr/local/bin/swiftlint already exists`. Installed through https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md#linters # brew "swiftlint" # Fails on the CI: `Target /usr/local/bin/swiftlint Target /usr/local/bin/swiftlint already exists`. Installed through https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md#linters
# brew "imagemagick" # Upgrading imagemagick has failed! # brew "imagemagick" # Upgrading imagemagick has failed!