Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions .github/workflows/react-native-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,25 +302,38 @@ jobs:
extract_release_notes() {
local body="$1"

# Remove "Summary by CodeRabbit" section and auto-generated comment line
# First pass: Remove everything between CodeRabbit comment markers using sed
# This handles multi-line auto-generated content
local cleaned_body="$(printf '%s\n' "$body" \
| grep -v '<!-- end of auto-generated comment: release notes by coderabbit.ai -->' \
| sed '/<!-- This is an auto-generated comment: release notes by coderabbit.ai -->/,/<!-- end of auto-generated comment: release notes by coderabbit.ai -->/d')"

# Second pass: Remove the "Summary by CodeRabbit" section
cleaned_body="$(printf '%s\n' "$cleaned_body" \
| awk '
BEGIN { skip=0 }
/^## Summary by CodeRabbit/ { skip=1; next }
/^## / && skip==1 { skip=0 }
skip==0 { print }
')"

# Try to extract content under "## Release Notes" heading
# Third pass: Remove any remaining HTML comment lines
cleaned_body="$(printf '%s\n' "$cleaned_body" | sed '/^<!--.*-->$/d' | sed '/^<!--/d' | sed '/^-->$/d')"

# Fourth pass: Trim leading and trailing whitespace/empty lines
cleaned_body="$(printf '%s\n' "$cleaned_body" | sed '/^$/d' | awk 'NF {p=1} p')"

# Try to extract content under "## Release Notes" heading if it exists
local notes="$(printf '%s\n' "$cleaned_body" \
| awk 'f && /^## /{exit} /^## Release Notes/{f=1; next} f')"

# If no specific section found, use the entire cleaned body (up to first 500 chars for safety)
# If no specific "Release Notes" section found, use the entire cleaned body
if [ -z "$notes" ]; then
notes="$(printf '%s\n' "$cleaned_body" | head -c 500)"
notes="$cleaned_body"
fi

# Final trim
notes="$(printf '%s\n' "$notes" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"

printf '%s\n' "$notes"
}

Expand Down
2 changes: 1 addition & 1 deletion expo-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/// <reference types="expo/types" />

// NOTE: This file should not be edited and should be in your git ignore
// NOTE: This file should not be edited and should be in your git ignore
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"@livekit/react-native-webrtc": "^137.0.2",
"@microsoft/signalr": "~8.0.7",
"@notifee/react-native": "^9.1.8",
"@novu/react-native": "~2.6.6",
"@novu/react-native": "^3.11.0",
"@react-native-community/netinfo": "^11.4.1",
"@react-native-firebase/app": "^23.5.0",
"@react-native-firebase/messaging": "^23.5.0",
Expand Down
8 changes: 8 additions & 0 deletions src/components/maps/location-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ const LocationPicker: React.FC<LocationPickerProps> = ({ initialLocation, onLoca
useEffect(() => {
if (initialLocation) {
setCurrentLocation(initialLocation);
// Move camera to the new location
if (cameraRef.current) {
cameraRef.current.setCamera({
centerCoordinate: [initialLocation.longitude, initialLocation.latitude],
zoomLevel: 15,
animationDuration: 1000,
});
}
} else {
getUserLocation().catch((error) => {
console.error('Failed to get user location:', error);
Expand Down
4 changes: 2 additions & 2 deletions src/components/notifications/NotificationInbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export const NotificationInbox = ({ isOpen, onClose }: NotificationInboxProps) =
const renderItem = ({ item }: { item: any }) => {
const notification: NotificationPayload = {
id: item.id,
title: item.title,
title: item.subject,
body: item.body,
createdAt: item.createdAt,
read: item.read,
Expand Down Expand Up @@ -194,7 +194,7 @@ export const NotificationInbox = ({ isOpen, onClose }: NotificationInboxProps) =
) : null}

<View style={styles.notificationContent}>
<Text style={[styles.notificationBody, !item.read ? styles.unreadNotificationText : {}]}>{notification.body}</Text>
<Text style={[styles.notificationBody, !item.read ? styles.unreadNotificationText : {}]}>{notification.title}</Text>
<Text style={styles.timestamp}>
{new Date(notification.createdAt).toLocaleDateString()} {new Date(notification.createdAt).toLocaleTimeString()}
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ describe('NotificationInbox', () => {
readAll: jest.fn(),
archiveAll: jest.fn(),
archiveAllRead: jest.fn(),
seenAll: jest.fn(),
});

mockUseCoreStore.mockImplementation((selector: any) => {
Expand Down Expand Up @@ -353,6 +354,7 @@ describe('NotificationInbox', () => {
readAll: jest.fn(),
archiveAll: jest.fn(),
archiveAllRead: jest.fn(),
seenAll: jest.fn(),
});

const { getByTestId } = render(
Expand All @@ -373,6 +375,7 @@ describe('NotificationInbox', () => {
readAll: jest.fn(),
archiveAll: jest.fn(),
archiveAllRead: jest.fn(),
seenAll: jest.fn(),
});

const { getByText } = render(
Expand Down
Loading