Skip to content

Commit 1633f7a

Browse files
authored
Merge branch 'dev' into feat/#150
2 parents 420ab80 + 3b51986 commit 1633f7a

Some content is hidden

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

45 files changed

+696
-157
lines changed

โ€Ž.DS_Storeโ€Ž

-6 KB
Binary file not shown.
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Gemini Code Review
2+
3+
on:
4+
push:
5+
branches: [ feat/gemini ]
6+
paths:
7+
- 'backend/**'
8+
pull_request:
9+
types: [opened, synchronize]
10+
11+
jobs:
12+
code-review:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v3
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Set up Node
24+
uses: actions/setup-node@v3
25+
26+
- name: Install GoogleGenerativeAI
27+
run: |
28+
npm install @google/generative-ai
29+
30+
# PR ์ด๋ฒคํŠธ์—์„œ์˜ ๋ณ€๊ฒฝ์‚ฌํ•ญ ์ฒ˜๋ฆฌ
31+
- name: Get git diff for PR
32+
if: github.event_name == 'pull_request'
33+
run: |
34+
git fetch origin "${{ github.event.pull_request.base.ref }}"
35+
git fetch origin "${{ github.event.pull_request.head.ref }}"
36+
git diff --unified=0 "origin/${{ github.event.pull_request.base.ref }}" > "diff.txt"
37+
echo "EVENT_TYPE=pull_request" >> $GITHUB_ENV
38+
39+
# Push ์ด๋ฒคํŠธ์—์„œ์˜ ๋ณ€๊ฒฝ์‚ฌํ•ญ ์ฒ˜๋ฆฌ
40+
- name: Get git diff for Push
41+
if: github.event_name == 'push'
42+
run: |
43+
git diff --unified=0 HEAD^ HEAD > "diff.txt"
44+
echo "EVENT_TYPE=push" >> $GITHUB_ENV
45+
46+
# Gemini๋ฅผ ์‚ฌ์šฉํ•œ ์ฝ”๋“œ ๋ถ„์„
47+
- name: Run Gemini-1.5-flash
48+
id: gemini_review
49+
uses: actions/github-script@v7
50+
with:
51+
script: |
52+
const fs = require("fs");
53+
const diff_output = fs.readFileSync("diff.txt",'utf8');
54+
55+
const { GoogleGenerativeAI } = require("@google/generative-ai");
56+
const genAI = new GoogleGenerativeAI("${{ secrets.GEMINI_API_KEY }}");
57+
const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash"});
58+
59+
// PR๊ณผ Push์— ๋”ฐ๋ผ ๋‹ค๋ฅธ ํ”„๋กฌํ”„ํŠธ ์‚ฌ์šฉ
60+
let prompt;
61+
if (process.env.EVENT_TYPE === 'pull_request') {
62+
prompt = `Explain in korean. You are a senior software engineer and need to perform a code review based on the results of a given git diff. Review the changed code from different perspectives and let us know if there are any changes that need to be made. If you see any code that needs to be fixed in the result of the git diff, you need to calculate the exact line number by referring to the "@@ -0,0 +0,0 @@" part. The output format is \[{"path":"{ filepath }", "line": { line }, "text": { review comment }, "side": "RIGHT"}\] format must be respected.\n<git diff>${diff_output}</git diff>`;
63+
} else {
64+
prompt = `Explain in korean. You are a senior software engineer and need to perform a code review based on the results of a given git diff. Provide a detailed review of the code changes, focusing on code quality, readability, performance, and security. Format your response in Markdown with clear headings for each file reviewed.\n<git diff>${diff_output}</git diff>`;
65+
}
66+
67+
const result = await model.generateContent(prompt);
68+
const response = await result.response;
69+
const text = response.text();
70+
71+
fs.writeFileSync('review_result.txt', text);
72+
console.log('Review results saved!');
73+
74+
# PR ์ด๋ฒคํŠธ: ๋ผ์ธ๋ณ„ ๋ฆฌ๋ทฐ ์ฝ”๋ฉ˜ํŠธ ์ถ”๊ฐ€
75+
- name: Format and add PR review comments
76+
if: env.EVENT_TYPE == 'pull_request'
77+
id: store
78+
run: |
79+
COMMENT=$(sed '/^```/d' review_result.txt | jq -c .)
80+
echo "comment=$COMMENT" >> $GITHUB_OUTPUT
81+
82+
- name: Add Pull Request Review Comment
83+
if: env.EVENT_TYPE == 'pull_request'
84+
uses: nbaztec/add-pr-review-comment@v1.0.7
85+
with:
86+
comments: ${{ steps.store.outputs.comment }}
87+
repo-token: ${{ secrets.GITHUB_TOKEN }}
88+
repo-token-user-login: 'github-actions[bot]'
89+
allow-repeats: false
90+
91+
# Push ์ด๋ฒคํŠธ: ์•ก์…˜ ๋กœ๊ทธ์— ๋ฆฌ๋ทฐ ๊ฒฐ๊ณผ ์ถœ๋ ฅ ๋ฐ ์•„ํ‹ฐํŒฉํŠธ ์—…๋กœ๋“œ
92+
- name: Display review results in workflow log
93+
if: env.EVENT_TYPE == 'push'
94+
run: |
95+
echo "===== Gemini Code Review Results ====="
96+
cat review_result.txt
97+
echo "======================================"
98+
99+
- name: Upload review results as artifact
100+
if: env.EVENT_TYPE == 'push'
101+
uses: actions/upload-artifact@v4
102+
with:
103+
name: gemini-code-review
104+
path: review_result.txt

โ€ŽREADME.mdโ€Ž

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# ๐ŸŒฑ CommitField_BE
2+
> ์ปค๋ฐ‹ํ•„๋“œ (์‚ฌ์šฉ์ž์˜ ๊นƒํ—ˆ๋ธŒ ๊ธฐ๋ก์„ ํ™œ์šฉํ•ด ํŽซ ์œก์„ฑ ๋ฐ ์—…์  ๋‹ฌ์„ฑ์„ ์ง€์›ํ•˜๋ฉฐ, ์ฑ„ํŒ… ๋“ฑ ์ง€์†์ ์ธ ๋™๊ธฐ ๋ถ€์—ฌ๋ฅผ ๋•๋Š” ์„œ๋น„์Šค)
3+
4+
์ด ๊ฐœ๋ฐœ๊ธฐ๊ฐ„ : `2025.2.18` ~ `2025.03.13` (22์ผ)
5+
</br>
6+
๊ฐœ๋ฐœ์ธ์›: 5๋ช…
7+
8+
</br>
9+
<img width="1629" alt="แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2025-02-13 แ„‹แ…ฉแ„’แ…ฎ 5 17 27" src="https://github.com/user-attachments/assets/5b9be8f8-f524-4bd6-bee5-99dbd2d4f591" />
10+
11+
# ๐ŸŒด ํŒ€์› ์†Œ๊ฐœ
12+
<table>
13+
<tr>
14+
<td><img src="https://avatars.githubusercontent.com/u/15629036?v=4" width="200" height="200"></td>
15+
<td><img src="https://avatars.githubusercontent.com/u/181931584?v=4" width="200" height="200"></td>
16+
<td><img src="https://avatars.githubusercontent.com/u/93702730?v=4" width="200" height="200"></td>
17+
<td><img src="https://avatars.githubusercontent.com/u/82190411?v=4" width="200" height="200"></td>
18+
<td><img src="https://avatars.githubusercontent.com/u/55117130?v=4" width="200" height="200"></td>
19+
</tr>
20+
<tr>
21+
<td><a href="https://github.com/whale22">๊น€์†Œ์˜</a></td>
22+
<td><a href="https://github.com/skyeong42">์„ฑ์ˆ˜๊ฒฝ</a></td>
23+
<td><a href="https://github.com/seoyeonson">์†์„œ์—ฐ</a></td>
24+
<td><a href="https://github.com/ces0135-hub">๋ฐฑ์„ฑํ˜„</a></td>
25+
<td><a href="https://github.com/ces0135-hub">์œคํ˜„์Šน</a></td>
26+
</tr>
27+
</table>
28+
29+
## ๐Ÿ’ ๊ธฐ์ˆ  ์Šคํƒ
30+
31+
<img width="1046" alt="แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2025-03-14 แ„‹แ…ฉแ„’แ…ฎ 1 18 14" src="https://github.com/user-attachments/assets/48a7e53b-08c6-41bb-8fae-88fc9be322d3" />
32+
</br>
33+
34+
## ๐ŸŒผ ์‹œ์Šคํ…œ ์•„ํ‚คํ…์ณ
35+
36+
<img width="1545" alt="แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2025-02-13 แ„‹แ…ฉแ„’แ…ฎ 1 18 55" src="https://github.com/user-attachments/assets/cc121c13-be01-47fd-a44a-64bf3a6433c7" />
37+
</br>
38+
39+
## ๐ŸŒณ ERD
40+
41+
<img width="1502" alt="แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2025-03-14 แ„‹แ…ฉแ„’แ…ฎ 1 19 59" src="https://github.com/user-attachments/assets/4c50079c-240c-47d3-9c87-e09e13f4d9b5" />
42+
</br>
43+
44+
45+
# ๐Ÿ€ ํŽ˜์ด์ง€ ๋ณ„ ๊ธฐ๋Šฅ
46+
47+
## ๐ŸŒบ ๋ฉ”์ธ ํŽ˜์ด์ง€
48+
49+
<img width="1600" alt="๋ฉ”์ธ ํŽ˜์ด์ง€" src="https://github.com/user-attachments/assets/824e6caa-6a15-4b1b-a747-a5da09d29892" />
50+
</br>
51+
52+
### ๐Ÿƒ ๊ธฐ๋Šฅ
53+
#### ๐Ÿ”น ํŽซ/๋žญํ‚น
54+
- ๊ณ„์ ˆ ๋ณ„ ๋žญํ‚น ์„ค๊ณ„๋กœ ์ด ์ปค๋ฐ‹ ์ˆ˜์™€ ๊ณ„์ ˆ ๋ณ„ ์ปค๋ฐ‹ ์ˆ˜.
55+
- ํ˜„์žฌ ์‹œ์ฆŒ์— ๋งž๋Š” ์ปค๋ฐ‹ ์ˆ˜์— ๋”ฐ๋ผ ๋žญํ‚น์„ ๋ถ€์—ฌ.
56+
#### ๐Ÿ”น ์ปค๋ฐ‹ ๊ฐœ์ˆ˜ ์ž๋™ ๊ฐฑ์‹ 
57+
- ์œ ์ € ์ปค๋ฐ‹ ์ˆ˜ ์ฃผ๊ธฐ์  ๊ฐฑ์‹ .
58+
- ์Šคํ”„๋ง ์ด๋ฒคํŠธ๋ฅผ ํ†ตํ•œ ๋ฐ์ดํ„ฐ ์ผ๊ด„ ๊ฐฑ์‹ .
59+
#### ๐Ÿ”น ์‹ค์‹œ๊ฐ„ ์•Œ๋ฆผ
60+
- ์‹œ์ฆŒ ์•Œ๋ฆผ
61+
- ๋žญํ‚น ์•Œ๋ฆผ
62+
- ์—ฐ์† ์ปค๋ฐ‹ ์ถ•ํ•˜ ์•Œ๋ฆผ
63+
- ์ปค๋ฐ‹ ๋ถ€์žฌ ์•Œ๋ฆผ
64+
65+
## ๐ŸŒน ํŽซ
66+
67+
<img width="1600" alt="ํŽซ" src="https://github.com/user-attachments/assets/766fc5cf-11a4-43ad-bd58-1aa7f8908efa" />
68+
</br>
69+
70+
### ๐Ÿƒ ๊ธฐ๋Šฅ
71+
#### ๐Ÿ”น ํŽซ
72+
- ์‚ฌ์šฉ์ž ๋ณ„ ํŽซ ํ™•์ธ ๊ฐ€๋Šฅ.
73+
74+
## ๐ŸŒป ๋กœ๊ทธ์ธ
75+
76+
<img width="1600" alt="๋กœ๊ทธ์ธ" src="https://github.com/user-attachments/assets/a3842c23-023c-4eda-965f-4767768cb5cf" />
77+
</br>
78+
79+
### ๐Ÿƒ ๊ธฐ๋Šฅ
80+
#### ๐Ÿ”น ๋กœ๊ทธ์ธ
81+
- Github API๋ฅผ ์ด์šฉํ•œ ๋กœ๊ทธ์ธ ๊ตฌํ˜„.
82+
- ์„ธ์…˜ ๋ฐฉ์‹ ์‚ฌ์šฉ.
83+
84+
85+
## ๐ŸŒท ์ฑ„ํŒ…
86+
<img width="1600" alt="๋กœ๊ทธ์ธ" src="https://github.com/user-attachments/assets/f29670ac-4dbe-4af0-87d5-3e9360a9246e" />
87+
</br>
88+
<img width="1600" alt="๋กœ๊ทธ์ธ" src="https://github.com/user-attachments/assets/a09a257f-9ebf-43ec-89f3-7399678e17b2" />
89+
</br>
90+
91+
92+
### ๐Ÿƒ ๊ธฐ๋Šฅ
93+
#### ๐Ÿ”น ์ฑ„ํŒ… ๋ฐฉ ๊ด€๋ฆฌ
94+
- ๋ฐ˜์žฅ์ด ์ฑ„ํŒ… ๋ฐฉ์„ ์ƒ์„ฑ ๋ฐ ์‚ญ์ œ ๊ฐ€๋Šฅ.
95+
- ๋งˆ์ง€๋ง‰ ์‚ฌ์šฉ์ž๊ฐ€ ๋‚˜๊ฐ€๋ฉด ์ฑ„ํŒ… ๋ฐฉ ์ž๋™ ์‚ญ์ œ.
96+
- ์ฑ„ํŒ… ๋ฐฉ ๋ชฉ๋ก ์กฐํšŒ (์ „์ฒด, ๋‚ด๊ฐ€ ์ƒ์„ฑํ•œ ๋ฐฉ, ์ฐธ์—ฌ ์ค‘์ธ ๋ฐฉ, ์ข‹์•„์š” ์ˆœ, ๋‚ด๊ฐ€ ์ข‹์•„์š”ํ•œ ๋ฐฉ).
97+
- ์ค‘๋ณต ์ฐธ์—ฌ ๋ถˆ๊ฐ€.
98+
- ํ‚ค์›Œ๋“œ ๊ธฐ๋ฐ˜ ์ฑ„ํŒ… ๋ฐฉ ๊ฒ€์ƒ‰.
99+
- ๋ฐ˜์žฅ๋งŒ ์ฑ„ํŒ… ๋ฐฉ ์ด๋ฆ„ ์ˆ˜์ • ๊ฐ€๋Šฅ.
100+
- ๋น„๋ฐ€๋ฒˆํ˜ธ ์„ค์ • ๊ฐ€๋Šฅ.
101+
102+
#### ๐Ÿ”น ์ฑ„ํŒ… ๊ธฐ๋Šฅ
103+
- ์‹ค์‹œ๊ฐ„ ์–‘๋ฐฉํ–ฅ ํ†ต์‹  ์‚ฌ์šฉ์ž ๋ฉ”์‹œ์ง€ ์ „์†ก.
104+
- ์ฑ„ํŒ… ๋ฐฉ ๋‚ด ๋ฉ”์‹œ์ง€ ์กฐํšŒ (์‚ฌ์šฉ์ž๊ฐ€ ๋“ค์–ด์˜จ ์‹œ์ ๋ถ€ํ„ฐ ํ™•์ธ ๊ฐ€๋Šฅ).
105+
106+
#### ๐Ÿ”น ์‚ฌ์šฉ์ž ๊ด€๋ฆฌ
107+
- ์˜จ๋ผ์ธ/์˜คํ”„๋ผ์ธ ์ƒํƒœ ํ™•์ธ (๋กœ๊ทธ์ธ, ๋กœ๊ทธ์•„์›ƒ).
108+
- ์ฑ„ํŒ… ๋ฐฉ ์ฐธ์—ฌ์ž ๋ชฉ๋ก ์กฐํšŒ ๊ฐ€๋Šฅ.
109+
- ์ฑ„ํŒ… ๋ฐฉ ์ข‹์•„์š” ๊ธฐ๋Šฅ ์ œ๊ณต (์ข‹์•„์š” ์ˆœ ์ •๋ ฌ ๊ฐ€๋Šฅ).
110+
111+
112+
113+

โ€Žsrc/.DS_Storeโ€Ž

-6 KB
Binary file not shown.

โ€Žsrc/main/.DS_Storeโ€Ž

-6 KB
Binary file not shown.

โ€Žsrc/main/java/.DS_Storeโ€Ž

-6 KB
Binary file not shown.
-6 KB
Binary file not shown.
-6 KB
Binary file not shown.
-6 KB
Binary file not shown.

src/main/java/cmf/commitField/domain/admin/controller/ApiV1PetImgController.java renamed to src/main/java/cmf/commitField/domain/admin/admin/controller/ApiV1PetImgController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cmf.commitField.domain.admin.controller;
1+
package cmf.commitField.domain.admin.admin.controller;
22

33
import cmf.commitField.global.aws.s3.S3Service;
44
import lombok.RequiredArgsConstructor;

0 commit comments

Comments
ย (0)