about summary refs log tree commit diff
diff options
context:
space:
mode:
authorhailey <me@haileyok.com>2025-07-24 21:07:06 -0700
committerGitHub <noreply@github.com>2025-07-24 21:07:06 -0700
commitc6b578fe918b56d83c683f089ca7266535bab766 (patch)
tree441fe74752fbabe001723d89448a2d7e1709b22a
parentcaeaff157c10323c10bcdc551e9096aa0ea62b61 (diff)
downloadvoidsky-c6b578fe918b56d83c683f089ca7266535bab766.tar.zst
fix final final final (#8719)
-rw-r--r--.github/workflows/pull-request-comment.yml7
-rw-r--r--app.config.js8
-rw-r--r--src/lib/hooks/useIntentHandler.ts5
-rw-r--r--src/screens/Settings/Settings.tsx38
4 files changed, 43 insertions, 15 deletions
diff --git a/.github/workflows/pull-request-comment.yml b/.github/workflows/pull-request-comment.yml
index cc35c2d6b..8a9e9d9b5 100644
--- a/.github/workflows/pull-request-comment.yml
+++ b/.github/workflows/pull-request-comment.yml
@@ -81,6 +81,7 @@ jobs:
         uses: marocchino/sticky-pull-request-comment@v2
         with:
           header: pull-request-eas-build-${{ github.sha }}
+          number: ${{ github.event.issue.number }}
           message: |
             An OTA deployment has been requested and is now running...
 
@@ -158,17 +159,18 @@ jobs:
         env:
           DENIS_API_KEY: ${{ secrets.DENIS_API_KEY }}
           CHANNEL_NAME: pull-request-${{ github.event.issue.number }}
-          BUNDLE_VERSION:
+          RUNTIME_VERSION:
 
 
       - name: 💬 Drop a comment
         uses: marocchino/sticky-pull-request-comment@v2
         with:
           header: pull-request-eas-build-${{ github.sha }}
+          number: ${{ github.event.issue.number }}
           message: |
             Your requested OTA deployment was successful! You may now apply it by pressing the link below.
 
-            [Apply OTA update](bluesky://ota-apply?channel=pull-request-${{ github.event.issue.number }})
+            [Apply OTA update](bluesky://intent/apply-ota?channel=pull-request-${{ github.event.issue.number }})
 
             [Here is some music to listen to while you wait...](https://www.youtube.com/watch?v=VBlFHuCzPgY)
             ---
@@ -180,6 +182,7 @@ jobs:
         if: failure()
         with:
           header: pull-request-eas-build-${{ github.sha }}
+          number: ${{ github.event.issue.number }}
           message: |
             Your requested OTA deployment was unsuccessful. See action logs for more details.
             ---
diff --git a/app.config.js b/app.config.js
index e065d0d73..26d1dcae5 100644
--- a/app.config.js
+++ b/app.config.js
@@ -26,12 +26,8 @@ module.exports = function (_config) {
     ...(IS_DEV || IS_TESTFLIGHT ? [] : []),
   ]
 
-  const UPDATES_CHANNEL = IS_TESTFLIGHT
-    ? 'testflight'
-    : IS_PRODUCTION
-      ? 'production'
-      : undefined
-  const UPDATES_ENABLED = !!UPDATES_CHANNEL
+  const UPDATES_ENABLED =
+    IS_TESTFLIGHT !== undefined || IS_PRODUCTION !== undefined
 
   const USE_SENTRY = Boolean(process.env.SENTRY_AUTH_TOKEN)
 
diff --git a/src/lib/hooks/useIntentHandler.ts b/src/lib/hooks/useIntentHandler.ts
index f55217e56..c359b2bd6 100644
--- a/src/lib/hooks/useIntentHandler.ts
+++ b/src/lib/hooks/useIntentHandler.ts
@@ -13,7 +13,6 @@ import {
 } from '#/components/ageAssurance/AgeAssuranceRedirectDialog'
 import {useIntentDialogs} from '#/components/intents/IntentDialogs'
 import {Referrer} from '../../../modules/expo-bluesky-swiss-army'
-import {IS_TESTFLIGHT} from '../app-info.web'
 import {useApplyPullRequestOTAUpdate} from './useOTAUpdates'
 
 type IntentType = 'compose' | 'verify-email' | 'age-assurance' | 'apply-ota'
@@ -97,10 +96,6 @@ export function useIntentHandler() {
           return
         }
         case 'apply-ota': {
-          if (!isNative || !IS_TESTFLIGHT) {
-            return
-          }
-
           const channel = params.get('channel')
           if (!channel) {
             Alert.alert('Error', 'No channel provided to look for.')
diff --git a/src/screens/Settings/Settings.tsx b/src/screens/Settings/Settings.tsx
index 9596c2479..b712c054c 100644
--- a/src/screens/Settings/Settings.tsx
+++ b/src/screens/Settings/Settings.tsx
@@ -1,5 +1,5 @@
 import {useState} from 'react'
-import {LayoutAnimation, Pressable, View} from 'react-native'
+import {Alert, LayoutAnimation, Pressable, View} from 'react-native'
 import {Linking} from 'react-native'
 import {useReducedMotion} from 'react-native-reanimated'
 import {type AppBskyActorDefs, moderateProfile} from '@atproto/api'
@@ -19,7 +19,7 @@ import {
 } from '#/lib/routes/types'
 import {sanitizeDisplayName} from '#/lib/strings/display-names'
 import {sanitizeHandle} from '#/lib/strings/handles'
-import {isNative} from '#/platform/detection'
+import {isIOS, isNative} from '#/platform/detection'
 import {useProfileShadow} from '#/state/cache/profile-shadow'
 import * as persisted from '#/state/persisted'
 import {clearStorage} from '#/state/persisted'
@@ -367,6 +367,7 @@ function DevOptions() {
   const navigation = useNavigation<NavigationProp>()
   const {mutate: deleteChatDeclarationRecord} = useDeleteActorDeclaration()
   const {
+    tryApplyUpdate,
     revertToEmbedded,
     isCurrentlyRunningPullRequestDeployment,
     currentChannel,
@@ -399,6 +400,30 @@ function DevOptions() {
     setActyNotifNudged(false)
   }
 
+  const onPressApplyOta = () => {
+    Alert.prompt(
+      'Apply OTA',
+      'Enter the channel for the OTA you wish to apply.',
+      [
+        {
+          style: 'cancel',
+          text: 'Cancel',
+        },
+        {
+          style: 'default',
+          text: 'Apply',
+          onPress: channel => {
+            tryApplyUpdate(channel ?? '')
+          },
+        },
+      ],
+      'plain-text',
+      isCurrentlyRunningPullRequestDeployment
+        ? currentChannel
+        : 'pull-request-',
+    )
+  }
+
   return (
     <>
       <SettingsList.PressableItem
@@ -459,6 +484,15 @@ function DevOptions() {
           <Trans>Clear all storage data (restart after this)</Trans>
         </SettingsList.ItemText>
       </SettingsList.PressableItem>
+      {isIOS ? (
+        <SettingsList.PressableItem
+          onPress={onPressApplyOta}
+          label={_(msg`Apply Pull Request`)}>
+          <SettingsList.ItemText>
+            <Trans>Apply Pull Request</Trans>
+          </SettingsList.ItemText>
+        </SettingsList.PressableItem>
+      ) : null}
       {isNative && isCurrentlyRunningPullRequestDeployment ? (
         <SettingsList.PressableItem
           onPress={revertToEmbedded}