Skip to content

Commit 80e1ca0

Browse files
authored
Merge pull request #10 from GulSam00/develop
Merge : 테스트용 머지
2 parents 5f344f1 + 14b255d commit 80e1ca0

157 files changed

Lines changed: 8646 additions & 2208 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/gpt-review.yml

Lines changed: 18 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,28 @@
1-
name: PR Blog Summarizer
2-
3-
on:
4-
pull_request:
5-
types: [opened, synchronize]
1+
name: Code Review
62

73
permissions:
8-
issues: write
4+
contents: read
95
pull-requests: write
106

7+
on:
8+
pull_request:
9+
types: [opened, reopened, synchronize]
10+
1111
jobs:
12-
process:
12+
test:
1313
runs-on: ubuntu-latest
1414

15+
if: ${{ contains(github.event.pull_request.title, '#gpt') || contains(github.event.pull_request.body, '#gpt') }}
1516
steps:
16-
# Step 1: Check out the code
17-
- name: Check out code
18-
uses: actions/checkout@v3
19-
with:
20-
fetch-depth: 0
21-
22-
# Step 2: Set up Python
23-
- name: Set up Python
24-
uses: actions/setup-python@v4
25-
with:
26-
python-version: '3.8'
27-
28-
# Step 3: Install dependencies
29-
- name: Install dependencies
30-
run: |
31-
python -m pip install --upgrade pip
32-
pip install openai requests
33-
34-
# Step 4: Get Changed Files
35-
- name: Get Changed Files
36-
id: get_files
37-
run: |
38-
CHANGED_FILES=$(git diff --name-only origin/main ${{ github.sha }})
39-
40-
if [ -z "$CHANGED_FILES" ]; then
41-
echo "changed_files=" >> $GITHUB_ENV
42-
else
43-
# .md 파일만 필터링
44-
MD_FILES=$(echo "$CHANGED_FILES" | grep -E '^week[0-9]+/.*\.md$')
45-
echo $MD_FILES
46-
47-
if [ -z "$MD_FILES" ]; then
48-
echo "changed_files=" >> $GITHUB_ENV
49-
else
50-
# 환경 변수에 저장
51-
echo "changed_files=$MD_FILES" >> $GITHUB_ENV
52-
fi
53-
fi
54-
55-
# Step 5: Process Changed Files
56-
- name: Process Changed Files
17+
- uses: anc95/ChatGPT-CodeReview@main
5718
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5820
OPENAI_API_KEY: ${{ secrets.GPT_KEY }}
59-
changed_files: ${{ env.changed_files }}
60-
run: |
61-
if [ -z "$changed_files" ]; then
62-
echo "No changed files to process."
63-
exit 0
64-
fi
65-
66-
SUMMARY_MESSAGE="### Automated Review\n"
67-
IFS=$'\n'
68-
for file_path in $changed_files; do
69-
# Skip link.md files
70-
if [[ "$file_path" == *link.md ]]; then
71-
continue
72-
fi
73-
74-
# Process non-link.md files
75-
echo "Processing file: $file_path"
76-
FILE_CONTENT=$(cat "$file_path" || echo "")
77-
if [ -z "$FILE_CONTENT" ]; then
78-
SUMMARY_MESSAGE+="Error: Could not read content of $file_path\n"
79-
continue
80-
fi
81-
82-
# Run feedback.py
83-
FEEDBACK=$(python feedback.py --content "$FILE_CONTENT" || echo "Error: feedback.py failed for $file_path")
84-
SUMMARY_MESSAGE+="Feedback for file: $file_path\n"
85-
SUMMARY_MESSAGE+="$FEEDBACK\n"
86-
done
87-
88-
echo "summary_message<<EOF" >> $GITHUB_ENV
89-
echo -e "$SUMMARY_MESSAGE" >> $GITHUB_ENV
90-
echo "EOF" >> $GITHUB_ENV
91-
92-
# Step 6: Post Comment on Pull Request
93-
- name: Post Comment on Pull Request
94-
uses: actions/github-script@v6
95-
with:
96-
github-token: ${{ secrets.GITHUB_TOKEN }}
97-
script: |
98-
const summary = process.env.summary_message;
99-
if (summary && summary.trim().length > 0) {
100-
await github.rest.issues.createComment({
101-
...context.repo,
102-
issue_number: context.payload.pull_request.number,
103-
body: summary
104-
});
105-
}
21+
# optional
22+
LANGUAGE: Korean
23+
max_tokens: 10000
24+
MAX_PATCH_LENGTH: 10000
25+
ACTIONS_STEP_DEBUG: true
26+
27+
IGNORE_PATTERNS: /dist, /node_modules,*.md # Regex pattern to ignore files, separated by comma
28+
# INCLUDE_PATTERNS: '*.js, *.ts, *.jsx, *.tsx' # glob pattern or regex pattern to include files, separated by comma

.prettierrc.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"$schema": "https://json.schemastore.org/prettierrc",
3-
"semi": true,
43
"tabWidth": 2,
54
"singleQuote": true,
65
"printWidth": 120,

apps/mobile/app/(tabs)/_layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export default function TabLayout() {
2525
},
2626
default: {},
2727
}),
28-
}}>
28+
}}
29+
>
2930
<Tabs.Screen
3031
name="index"
3132
options={{

apps/mobile/app/(tabs)/explore.tsx

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ export default function TabTwoScreen() {
1818
name="chevron.left.forwardslash.chevron.right"
1919
style={styles.headerImage}
2020
/>
21-
}>
21+
}
22+
>
2223
<ThemedView style={styles.titleContainer}>
2324
<ThemedText type="title">Explore</ThemedText>
2425
</ThemedView>
2526
<ThemedText>This app includes example code to help you get started.</ThemedText>
2627
<Collapsible title="File-based routing">
2728
<ThemedText>
28-
This app has two screens:{' '}
29-
<ThemedText type="defaultSemiBold">app/(tabs)/index.tsx</ThemedText> and{' '}
29+
This app has two screens: <ThemedText type="defaultSemiBold">app/(tabs)/index.tsx</ThemedText> and{' '}
3030
<ThemedText type="defaultSemiBold">app/(tabs)/explore.tsx</ThemedText>
3131
</ThemedText>
3232
<ThemedText>
33-
The layout file in <ThemedText type="defaultSemiBold">app/(tabs)/_layout.tsx</ThemedText>{' '}
34-
sets up the tab navigator.
33+
The layout file in <ThemedText type="defaultSemiBold">app/(tabs)/_layout.tsx</ThemedText> sets up the tab
34+
navigator.
3535
</ThemedText>
3636
<ExternalLink href="https://docs.expo.dev/router/introduction">
3737
<ThemedText type="link">Learn more</ThemedText>
@@ -46,8 +46,7 @@ export default function TabTwoScreen() {
4646
<Collapsible title="Images">
4747
<ThemedText>
4848
For static images, you can use the <ThemedText type="defaultSemiBold">@2x</ThemedText> and{' '}
49-
<ThemedText type="defaultSemiBold">@3x</ThemedText> suffixes to provide files for
50-
different screen densities
49+
<ThemedText type="defaultSemiBold">@3x</ThemedText> suffixes to provide files for different screen densities
5150
</ThemedText>
5251
<Image source={require('@/assets/images/react-logo.png')} style={{ alignSelf: 'center' }} />
5352
<ExternalLink href="https://reactnative.dev/docs/images">
@@ -57,9 +56,7 @@ export default function TabTwoScreen() {
5756
<Collapsible title="Custom fonts">
5857
<ThemedText>
5958
Open <ThemedText type="defaultSemiBold">app/_layout.tsx</ThemedText> to see how to load{' '}
60-
<ThemedText style={{ fontFamily: 'SpaceMono' }}>
61-
custom fonts such as this one.
62-
</ThemedText>
59+
<ThemedText style={{ fontFamily: 'SpaceMono' }}>custom fonts such as this one.</ThemedText>
6360
</ThemedText>
6461
<ExternalLink href="https://docs.expo.dev/versions/latest/sdk/font">
6562
<ThemedText type="link">Learn more</ThemedText>
@@ -68,8 +65,8 @@ export default function TabTwoScreen() {
6865
<Collapsible title="Light and dark mode components">
6966
<ThemedText>
7067
This template has light and dark mode support. The{' '}
71-
<ThemedText type="defaultSemiBold">useColorScheme()</ThemedText> hook lets you inspect
72-
what the user's current color scheme is, and so you can adjust UI colors accordingly.
68+
<ThemedText type="defaultSemiBold">useColorScheme()</ThemedText> hook lets you inspect what the user's current
69+
color scheme is, and so you can adjust UI colors accordingly.
7370
</ThemedText>
7471
<ExternalLink href="https://docs.expo.dev/develop/user-interface/color-themes/">
7572
<ThemedText type="link">Learn more</ThemedText>
@@ -78,15 +75,15 @@ export default function TabTwoScreen() {
7875
<Collapsible title="Animations">
7976
<ThemedText>
8077
This template includes an example of an animated component. The{' '}
81-
<ThemedText type="defaultSemiBold">components/HelloWave.tsx</ThemedText> component uses
82-
the powerful <ThemedText type="defaultSemiBold">react-native-reanimated</ThemedText>{' '}
83-
library to create a waving hand animation.
78+
<ThemedText type="defaultSemiBold">components/HelloWave.tsx</ThemedText> component uses the powerful{' '}
79+
<ThemedText type="defaultSemiBold">react-native-reanimated</ThemedText> library to create a waving hand
80+
animation.
8481
</ThemedText>
8582
{Platform.select({
8683
ios: (
8784
<ThemedText>
88-
The <ThemedText type="defaultSemiBold">components/ParallaxScrollView.tsx</ThemedText>{' '}
89-
component provides a parallax effect for the header image.
85+
The <ThemedText type="defaultSemiBold">components/ParallaxScrollView.tsx</ThemedText> component provides a
86+
parallax effect for the header image.
9087
</ThemedText>
9188
),
9289
})}

apps/mobile/app/(tabs)/index.tsx

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,34 @@ export default function HomeScreen() {
99
return (
1010
<ParallaxScrollView
1111
headerBackgroundColor={{ light: '#A1CEDC', dark: '#1D3D47' }}
12-
headerImage={
13-
<Image
14-
source={require('@/assets/images/partial-react-logo.png')}
15-
style={styles.reactLogo}
16-
/>
17-
}>
12+
headerImage={<Image source={require('@/assets/images/partial-react-logo.png')} style={styles.reactLogo} />}
13+
>
1814
<ThemedView style={styles.titleContainer}>
1915
<ThemedText type="title">Welcome!</ThemedText>
2016
<HelloWave />
2117
</ThemedView>
2218
<ThemedView style={styles.stepContainer}>
2319
<ThemedText type="subtitle">Step 1: Try it</ThemedText>
2420
<ThemedText>
25-
Edit <ThemedText type="defaultSemiBold">app/(tabs)/index.tsx</ThemedText> to see changes.
26-
Press{' '}
21+
Edit <ThemedText type="defaultSemiBold">app/(tabs)/index.tsx</ThemedText> to see changes. Press{' '}
2722
<ThemedText type="defaultSemiBold">
2823
{Platform.select({
2924
ios: 'cmd + d',
3025
android: 'cmd + m',
31-
web: 'F12'
26+
web: 'F12',
3227
})}
3328
</ThemedText>{' '}
3429
to open developer tools.
3530
</ThemedText>
3631
</ThemedView>
3732
<ThemedView style={styles.stepContainer}>
3833
<ThemedText type="subtitle">Step 2: Explore</ThemedText>
39-
<ThemedText>
40-
Tap the Explore tab to learn more about what's included in this starter app.
41-
</ThemedText>
34+
<ThemedText>Tap the Explore tab to learn more about what's included in this starter app.</ThemedText>
4235
</ThemedView>
4336
<ThemedView style={styles.stepContainer}>
4437
<ThemedText type="subtitle">Step 3: Get a fresh start</ThemedText>
4538
<ThemedText>
46-
When you're ready, run{' '}
47-
<ThemedText type="defaultSemiBold">npm run reset-project</ThemedText> to get a fresh{' '}
39+
When you're ready, run <ThemedText type="defaultSemiBold">npm run reset-project</ThemedText> to get a fresh{' '}
4840
<ThemedText type="defaultSemiBold">app</ThemedText> directory. This will move the current{' '}
4941
<ThemedText type="defaultSemiBold">app</ThemedText> to{' '}
5042
<ThemedText type="defaultSemiBold">app-example</ThemedText>.

apps/mobile/components/Collapsible.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ export function Collapsible({ children, title }: PropsWithChildren & { title: st
1313

1414
return (
1515
<ThemedView>
16-
<TouchableOpacity
17-
style={styles.heading}
18-
onPress={() => setIsOpen((value) => !value)}
19-
activeOpacity={0.8}>
16+
<TouchableOpacity style={styles.heading} onPress={() => setIsOpen((value) => !value)} activeOpacity={0.8}>
2017
<IconSymbol
2118
name="chevron.right"
2219
size={18}

apps/mobile/components/HelloWave.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function HelloWave() {
1616
useEffect(() => {
1717
rotationAnimation.value = withRepeat(
1818
withSequence(withTiming(25, { duration: 150 }), withTiming(0, { duration: 150 })),
19-
4 // Run the animation 4 times
19+
4, // Run the animation 4 times
2020
);
2121
}, []);
2222

apps/mobile/components/ParallaxScrollView.tsx

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import type { PropsWithChildren, ReactElement } from 'react';
22
import { StyleSheet } from 'react-native';
3-
import Animated, {
4-
interpolate,
5-
useAnimatedRef,
6-
useAnimatedStyle,
7-
useScrollViewOffset,
8-
} from 'react-native-reanimated';
3+
import Animated, { interpolate, useAnimatedRef, useAnimatedStyle, useScrollViewOffset } from 'react-native-reanimated';
94

105
import { ThemedView } from '@/components/ThemedView';
116
import { useBottomTabOverflow } from '@/components/ui/TabBarBackground';
@@ -18,11 +13,7 @@ type Props = PropsWithChildren<{
1813
headerBackgroundColor: { dark: string; light: string };
1914
}>;
2015

21-
export default function ParallaxScrollView({
22-
children,
23-
headerImage,
24-
headerBackgroundColor,
25-
}: Props) {
16+
export default function ParallaxScrollView({ children, headerImage, headerBackgroundColor }: Props) {
2617
const colorScheme = useColorScheme() ?? 'light';
2718
const scrollRef = useAnimatedRef<Animated.ScrollView>();
2819
const scrollOffset = useScrollViewOffset(scrollRef);
@@ -34,7 +25,7 @@ export default function ParallaxScrollView({
3425
translateY: interpolate(
3526
scrollOffset.value,
3627
[-HEADER_HEIGHT, 0, HEADER_HEIGHT],
37-
[-HEADER_HEIGHT / 2, 0, HEADER_HEIGHT * 0.75]
28+
[-HEADER_HEIGHT / 2, 0, HEADER_HEIGHT * 0.75],
3829
),
3930
},
4031
{
@@ -50,13 +41,11 @@ export default function ParallaxScrollView({
5041
ref={scrollRef}
5142
scrollEventThrottle={16}
5243
scrollIndicatorInsets={{ bottom }}
53-
contentContainerStyle={{ paddingBottom: bottom }}>
44+
contentContainerStyle={{ paddingBottom: bottom }}
45+
>
5446
<Animated.View
55-
style={[
56-
styles.header,
57-
{ backgroundColor: headerBackgroundColor[colorScheme] },
58-
headerAnimatedStyle,
59-
]}>
47+
style={[styles.header, { backgroundColor: headerBackgroundColor[colorScheme] }, headerAnimatedStyle]}
48+
>
6049
{headerImage}
6150
</Animated.View>
6251
<ThemedView style={styles.content}>{children}</ThemedView>

apps/mobile/components/ThemedText.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,7 @@ export type ThemedTextProps = TextProps & {
88
type?: 'default' | 'title' | 'defaultSemiBold' | 'subtitle' | 'link';
99
};
1010

11-
export function ThemedText({
12-
style,
13-
lightColor,
14-
darkColor,
15-
type = 'default',
16-
...rest
17-
}: ThemedTextProps) {
11+
export function ThemedText({ style, lightColor, darkColor, type = 'default', ...rest }: ThemedTextProps) {
1812
const color = useThemeColor({ light: lightColor, dark: darkColor }, 'text');
1913

2014
return (

apps/mobile/components/ui/IconSymbol.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ const MAPPING = {
1414
'chevron.left.forwardslash.chevron.right': 'code',
1515
'chevron.right': 'chevron-right',
1616
} as Partial<
17-
Record<
18-
import('expo-symbols').SymbolViewProps['name'],
19-
React.ComponentProps<typeof MaterialIcons>['name']
20-
>
17+
Record<import('expo-symbols').SymbolViewProps['name'], React.ComponentProps<typeof MaterialIcons>['name']>
2118
>;
2219

2320
export type IconSymbolName = keyof typeof MAPPING;

0 commit comments

Comments
 (0)