From ebf0a4585c7a4ddc918ee0f34fda4111ad42f188 Mon Sep 17 00:00:00 2001 From: Pablo P Varela Date: Sat, 20 Jun 2026 23:23:12 +0200 Subject: [PATCH] Address CodeRabbit review: fix scheme BlueprintIdentifier, deployment target, Foundation path, hardcoded test value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix BlueprintIdentifier in scheme to match actual test target ID (4F0E6636...) - Lower test target MACOSX_DEPLOYMENT_TARGET 14.0 → 13.0 to match app - Replace hardcoded SDK path for Foundation.framework with SDKROOT-relative - Use DEFAULT_IGNORED_APP_BUNDLE_ID constant instead of hardcoded bundle ID in test --- .github/workflows/build.yml | 11 +++++++++-- .github/workflows/www.yml | 11 ++++++++--- Swift Shift.xcodeproj/project.pbxproj | 6 +++--- .../xcshareddata/xcschemes/Swift Shift.xcscheme | 4 ++-- SwiftShiftTests/PreferencesManagerTests.swift | 6 ++++-- 5 files changed, 26 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f212188..56d7d4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,8 @@ name: Build & Test +permissions: + contents: read + on: pull_request: paths-ignore: @@ -15,13 +18,17 @@ jobs: build: runs-on: macos-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 + with: + persist-credentials: false - run: make build test: runs-on: macos-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 + with: + persist-credentials: false - name: Build and run tests run: | xcodebuild test \ diff --git a/.github/workflows/www.yml b/.github/workflows/www.yml index 52e2aa0..1a18975 100644 --- a/.github/workflows/www.yml +++ b/.github/workflows/www.yml @@ -1,5 +1,8 @@ name: Website +permissions: + contents: read + on: pull_request: paths: @@ -18,10 +21,12 @@ jobs: run: working-directory: www steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 + with: + persist-credentials: false + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 with: node-version: 22 - - uses: oven-sh/setup-bun@v2 + - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 - run: bun install - run: bun run build diff --git a/Swift Shift.xcodeproj/project.pbxproj b/Swift Shift.xcodeproj/project.pbxproj index 73ab894..688ddd5 100644 --- a/Swift Shift.xcodeproj/project.pbxproj +++ b/Swift Shift.xcodeproj/project.pbxproj @@ -91,7 +91,7 @@ E2D8CFB82B3C3B9B00EBB047 /* PermissionsManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermissionsManager.swift; sourceTree = ""; }; E2E6F5E92B3EF03C005B0D96 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; F400D7AF72C65A047C5C9D19 /* Constants.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Constants.swift; path = "Swift Shift/src/Constants.swift"; sourceTree = ""; }; - F8B92CDB5F568BDAA9756F45 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + F8B92CDB5F568BDAA9756F45 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -602,7 +602,7 @@ "$(inherited)", "@loader_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 14.0; + MACOSX_DEPLOYMENT_TARGET = 13.0; PRODUCT_BUNDLE_IDENTIFIER = com.pablopunk.SwiftShiftTests; PRODUCT_NAME = SwiftShiftTests; SWIFT_VERSION = 5.0; @@ -620,7 +620,7 @@ "$(inherited)", "@loader_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 14.0; + MACOSX_DEPLOYMENT_TARGET = 13.0; PRODUCT_BUNDLE_IDENTIFIER = com.pablopunk.SwiftShiftTests; PRODUCT_NAME = SwiftShiftTests; SWIFT_VERSION = 5.0; diff --git a/Swift Shift.xcodeproj/xcshareddata/xcschemes/Swift Shift.xcscheme b/Swift Shift.xcodeproj/xcshareddata/xcschemes/Swift Shift.xcscheme index 680144e..1f5dec8 100644 --- a/Swift Shift.xcodeproj/xcshareddata/xcschemes/Swift Shift.xcscheme +++ b/Swift Shift.xcodeproj/xcshareddata/xcschemes/Swift Shift.xcscheme @@ -28,7 +28,7 @@ buildForAnalyzing = "NO"> @@ -48,7 +48,7 @@ skipped = "NO"> diff --git a/SwiftShiftTests/PreferencesManagerTests.swift b/SwiftShiftTests/PreferencesManagerTests.swift index 3290340..2ebd9dc 100644 --- a/SwiftShiftTests/PreferencesManagerTests.swift +++ b/SwiftShiftTests/PreferencesManagerTests.swift @@ -153,8 +153,10 @@ final class PreferencesManagerTests: XCTestCase { // System apps are always ignored XCTAssertTrue(PreferencesManager.isAppIgnored("com.apple.notificationcenterui")) - // Default apps are initially ignored - XCTAssertTrue(PreferencesManager.isAppIgnored("pl.maketheweb.cleanshotx")) + // At least one default app should be initially ignored + XCTAssertTrue( + DEFAULT_IGNORED_APP_BUNDLE_ID.contains { PreferencesManager.isAppIgnored($0) } + ) } func testIsAppIgnored_respectsCustomList() {