code stringlengths 41 34.3k | lang stringclasses 8
values | review stringlengths 1 4.74k |
|---|---|---|
@@ -0,0 +1,172 @@
+package store.domain;
+
+import static store.constants.NumberConstants.FREEBIE_QUANTITY;
+
+import java.util.List;
+import store.dto.BuyGetQuantity;
+import store.dto.PromotionInfo;
+import store.io.InputView;
+
+public class PromotionManager {
+
+ private final List<PromotionInfo> promotionInfos;... | Java | ๋ต ํผ๋๋ฐฑ ๊ฐ์ฌํฉ๋๋ค :)
์ผ๋จ ๋์๊ฐ๊ฒ ๋ง๋๋ ๊ฒ ๋ชฉ์ ์ด์๊ธฐ์ ์ด๋ฐ ๊ตฌ์กฐ๊ฐ ๋์๋ฒ๋ ธ๋ค์,, ใ
ใ
์
๋ ฅ ๋ฐ๋ ๋ถ๋ถ์ ์ปจํธ๋กค๋ฌ๋ก ๋นผ์ ๋ฆฌํฉํ ๋งํ ์์ ์
๋๋ค! |
@@ -0,0 +1,48 @@
+package store.domain;
+
+import static store.constants.NumberConstants.SINGLE_PRODUCT_QUANTITY;
+
+import java.util.ArrayList;
+import java.util.List;
+import store.exception.ProductNotExistException;
+
+public class StoreHouse {
+
+ private final List<Product> productList = new ArrayList<>();
+
+
... | Java | ์ ๊ทธ ๋ฐฉ๋ฒ๋ ์ข์ ๊ฒ ๊ฐ์ง๋ง, ๋์ผํ ์ด๋ฆ์ ๊ฐ์ง ์ํ์ ๋ชจ๋ ๊ฐ์ ธ์์ ๊ฐ ์ํฉ์ ๋ง๊ฒ ์ฒ๋ฆฌํ๋ ๋ก์ง์๋ List๊ฐ ๋ ์ ์ ํ ๊ฒ ๊ฐ์ต๋๋ค! ๋ค์ํ ์๋ฃ๊ตฌ์กฐ๋ฅผ ๊ณ ๋ฏผํด ๋ณผ ์ ์๊ฒ ํด์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค :) |
@@ -0,0 +1,115 @@
+package store.io;
+
+import static store.constants.InputMessages.ADDITIONAL_PURCHASE_MESSAGE;
+import static store.constants.InputMessages.FREEBIE_ADDITION_MESSAGE;
+import static store.constants.InputMessages.INPUT_PRODUCT_NAME_AND_QUANTITY;
+import static store.constants.InputMessages.MEMBERSHIP_DI... | Java | ๋ค์ํ ์๊ฒฌ ์ ์ํด ์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค!!
์ง๊ธ ๋ณด๋ ๊ทธ๋ ๋ค์,, ํ์ผ์ ๋ํ ์ฒ๋ฆฌ๋ ์์ฐํ ๋ทฐ์๋ ๋ค๋ฅธ ์ฑ
์์ธ๋ฐ (๊ฐ์ ์ฝ์ด๋ค์ธ๋ค๋ ๋ถ๋ถ์ ๊ฝํ) ์ด ๋ถ๋ถ์ ๊ฐ๊ณผํ๋ ๊ฒ ๊ฐ์ต๋๋ค.์๋น์ค๋ก ๋ถ๋ฆฌํ๋ ๋ฐฉ๋ฒ๋ ์ข์ ๊ฒ ๊ฐ์์!
ํ๋ ์๊ฒฌ์ ์ฌ์ญ๊ณ ์ถ์ ๊ฒ ์๋๋ฐ, **๋ทฐ์์ ์
๋ ฅ๊ฐ์ ๋ํ ํ์ฑ์ ํ๋ ๊ฒ์ ์ด๋ป๊ฒ ์๊ฐํ์๋์ง** ๊ถ๊ธํฉ๋๋ค!
ํ์ฌ๋ ์
๋ ฅ ๋ฐ๊ธฐ+๊ฒ์ฆ+ํ์ฑ์ ๋ชจ๋ ์ํํ๊ณ ์์ด ์ฑ
์ ๋ถ๋ฆฌ๊ฐ ์ ์ด๋ฃจ์ด์ง์ง ์์ ๊ฒ ๊ฐ๋ค๊ณ ๋๊ปด์ง๋๋ค...
๋ง์ํด ์ฃผ์ ๊ฒ์ฒ๋ผ ๋น ๊ฐ์ ๊ฒ์ฆํ๋ ๋ก์ง์ parser๋ก ํฌํจ์ํจ๋ค๊ณ ํ๋ฉด, ๋ทฐ์์๋ ์
๋ ฅ์ ๋ฐ๋ ๊ธฐ๋ฅ๋ง ์... |
@@ -0,0 +1,138 @@
+name: CI
+
+on:
+ pull_request:
+ types:
+ - closed
+
+env:
+ IMAGE: ${{ vars.NCR_REGISTRY }}/follow-app
+ IMAGE_LATEST: ${{ vars.NCR_REGISTRY }}/follow-app:latest
+
+jobs:
+ lint-test:
+ name: lint and test
+ uses: ./.github/workflows/DRF-test.yaml
+
+ send-discord-fail-message:
+... | Unknown | ๋ค๋ฅธ yaml ํ์ผ์ ์๋ workflow ๋ฅผ ๊ฐ์ ธ์์ ์ฌ์ฉํ์๋๊ฑฐ ๊ฐ์๋ฐ, ์์
๋ด์ ์๋ ๋ณ์๋ ๋ฐ๋ก ๊บผ๋ด์ ์ธ ์ ์๋์ ?? |
@@ -0,0 +1,49 @@
+name: DRF Test
+
+on:
+ push:
+ workflow_call:
+
+jobs:
+ lint:
+ name: black check
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-python@v4
+ with:
+ python-version: "3.11"
+ - name: install black
+ run: pip in... | Unknown | DB๊ด๋ จ ๋ณ์๋ค๋ secret์ผ๋ก ์ถ๊ฐํด์ฃผ์
์ ์ฒ๋ฆฌํด์ฃผ์๋ฉด ๋ ์ข์๊ฑฐ ๊ฐ์ต๋๋ค :) |
@@ -0,0 +1,138 @@
+name: CI
+
+on:
+ pull_request:
+ types:
+ - closed
+
+env:
+ IMAGE: ${{ vars.NCR_REGISTRY }}/follow-app
+ IMAGE_LATEST: ${{ vars.NCR_REGISTRY }}/follow-app:latest
+
+jobs:
+ lint-test:
+ name: lint and test
+ uses: ./.github/workflows/DRF-test.yaml
+
+ send-discord-fail-message:
+... | Unknown | health-check๋ ์ด๋ค์์ผ๋ก ํ์ธํ๊ฒ ๋๋๊ฑด์ง ๊ถ๊ธํฉ๋๋ค! |
@@ -0,0 +1,33 @@
+from django.core.management.base import BaseCommand
+from django.contrib.auth.models import User
+from tweet.models import Follow, Post
+
+
+class Command(BaseCommand):
+ def handle(self, **options):
+ # if db has user script doesn't work
+ if User.objects.filter(username="user0").exi... | Python | ์ด๋ฐ๋ฐฉ๋ฒ์ด ์๋ค๋ ๋ง์ด ๋ฐฐ์ฐ๊ณ ๊ฐ๋๋ค ๊ฐ์ฌํฉ๋๋ค |
@@ -0,0 +1,138 @@
+name: CI
+
+on:
+ pull_request:
+ types:
+ - closed
+
+env:
+ IMAGE: ${{ vars.NCR_REGISTRY }}/follow-app
+ IMAGE_LATEST: ${{ vars.NCR_REGISTRY }}/follow-app:latest
+
+jobs:
+ lint-test:
+ name: lint and test
+ uses: ./.github/workflows/DRF-test.yaml
+
+ send-discord-fail-message:
+... | Unknown | test๋ง ํ๊ธฐ ์ํด ๋ถ๋ฌ์ค๋ workflow๋ผ ๋ณ์๋ฅผ ๊ฐ์ ธ์ฌ ์๊ฐ์ ๋ชปํ๋ค์.
job๋ผ๋ฆฌ์ ๋ณ์ ๊ณต์ ๋ฐฉ๋ฒ์ผ๋ก ๊บผ๋ผ ์ ์์ ๊ฒ ๊ฐ๊ธด ํ๋ฐ ์๋๋ ์ํด๋ดค์ด์ |
@@ -0,0 +1,49 @@
+name: DRF Test
+
+on:
+ push:
+ workflow_call:
+
+jobs:
+ lint:
+ name: black check
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-python@v4
+ with:
+ python-version: "3.11"
+ - name: install black
+ run: pip in... | Unknown | ๋ง์์ ๋ค๋ง ์ ๋ถ๋ถ์ด ์์ ํ ํ
์คํธ๋ง์ ์ํ ๋ถ๋ถ์ด๋ผ ๊ด์ฐฎ์ ๊ฑฐ๋ผ๊ณ ์๊ฐํ์ด์
์๋ test์ฉ envํ์ผ์ git์ ๊ทธ๋๋ก ์ฌ๋ ค์ actions์์ ์ฌ์ฉํ์๋๋ฐ ์ ๊ฐ ์ค์๋ก ncp key๋ฅผ ๋ฃ์ด์ ์ฌ๋ฆฌ๋ ๋ฐ๋์ ๊ธํ๊ฒ ์์ ๊ฐ์ด ๋ณ๊ฒฝ๋ ๊ฑฐ์์.
์ ๋ ์ ๋ฐ์์ผ๋ก ์์ฑํ๊ธฐ์ ๋ณด๊ธฐ ์์ข์ ๋ณด์ฌ์ ์กฐ๊ธ ๋ ์ธ๋ จ๋ ๋ฐฉ์์ผ๋ก ๋ณ๊ฒฝํด ๋ณด๊ฒ ์ต๋๋ค |
@@ -0,0 +1,138 @@
+name: CI
+
+on:
+ pull_request:
+ types:
+ - closed
+
+env:
+ IMAGE: ${{ vars.NCR_REGISTRY }}/follow-app
+ IMAGE_LATEST: ${{ vars.NCR_REGISTRY }}/follow-app:latest
+
+jobs:
+ lint-test:
+ name: lint and test
+ uses: ./.github/workflows/DRF-test.yaml
+
+ send-discord-fail-message:
+... | Unknown | health-check๋ฅผ ํ์ธํ๋ ๋ถ๋ถ์ ์์ง ๋ง๋ค์ง ์์์ด์ ๋์ ์ DRF test๋ฅผ ํต๊ณผํ๋ฉด ์ ์ ๋์์ธ ๊ฑฐ๋ก ๊ฐ์ฃผํ๊ณ ๋ง๋ค๊ธด ํ์ด์
์ฌ์ค actions์์ health-check๋ฅผ ๊ตฌํํ๊ธฐ ์กฐ๊ธ ๊น๋ค๋ก์์ k8s ์ ์ฉํ๋ฉด์ health-check๋ ๊ตฌํ ํ ๊ณํ์
๋๋ค. |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ์์๋ก ๋นผ๋๋๊ฒ ์ข์๋ฏ.
`server/categories.js`์๋ ์ ์๋์ด์๊ณ server๋ client๋ ๊ฐ์ด ์ฐ๊ฒ ๋ ํ
๋ฐ ์ด๋ป๊ฒ ์ฒ๋ฆฌํ ์ง ์ ํ๋๊ฒ ์ข์๋ฏ |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | `idle` ์ด๋ฒคํธ๊ฐ ๋ธ๋ผ์ฐ์ ์ฐฝ ํฌ๊ธฐ๋ฅผ ๋ณ๊ฒฝํ ๋ ๋๋ฌด ์์ฃผ ๋ฐ์ํ๋ฏ๋ก debounce ์ฒ๋ฆฌํ๋๊ฒ ์ข๊ฒ ์ |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ์
๋ ฅ๊ฐ๋ ์๊ณ , ๋ฆฌํด๊ฐ๋ ๊ณ ์ ๊ฐ์ธ๋ฐ ํจ์๋ก ๋ง๋ค์ด์ ๋ฐํํ ์ด์ ๊ฐ ์์ด๋ณด์. |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | `mainPageLoad`์์ ๋ฐ์ดํฐ ๋ก๋ฉ์ด ๋๋๋ ์์ ์ ๋ง๊ฒ ๊ธฐ์กดํ์ ์ ๊ฑฐํ๋ `DataDelete`๋ฅผ ์ฒ๋ฆฌํด์ผํ ๋ฏ ํจ. |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ์ดํ์
```suggestion
} else {
this.drawList[el.id].setMap(null);
delete this.drawList[el.id];
}
```
์ด๋ ๊ฒ ํด์ผํ์ง ์์๊น? |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ํ์์์ ์ ๊ฑฐ |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ๊ฐ์๊ธฐ ์ ๋๋ฌธ์๋ก ์์ํ ๊น์?
์ด๋ฆ๋ `deleteDraw` / `unsetDraw` ๋ฑ์ผ๋ก ํด์ผํ ๋ฏ |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | `0.01`์ ์์์ฒ๋ฆฌ |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ์ด๊ฒ๋ง underscore๋ก ์์ํ๋ ์ด์ ๊ฐ ๋ชจ์์?
๊ทธ๋ฆฌ๊ณ ๋ค์ด๋ฐ์ผ๋ก ๋ฌด์จ ์ผ์ ํ๋ ๋ฉ์๋์ธ์ง ์์์ฑ๊ธฐ ํ๋๋ค์. |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ๋ฆฌํด๊ฐ์ด ๊ธฐ์กด๊ฐ์ธ๊ฒ ์ด์ํ๋ฐ, ์ดํด๋ณด๋ ๋ฆฌํด๊ฐ ๋ฐ์์ ์ฐ๋๋ฐ๋ ์๋๊ฑฐ ๊ฐ์์. |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ์ดํ ์ฝ๋๊ฐ `mainPageLoad`๋ ์ค๋ณต๋๋ ๋ถ๋ถ์ด ๋ง์๋ฐ ์ผ๋ฐํ ํด์ผ๊ฒ ๋ค์. |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | style์ inline์ผ๋ก ์ง์ ์ง์ ํ๋ ๊ฒ ๋ณด๋ค๋ style์ `less(css)`์ ์ ์ํ๊ณ class๋ช
์ toggle ํ๋ ๋ฐฉ์์ ์ฐ๋๊ฒ ์ข์์. |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | ์ฌ๊ธฐ๋ ๋ง์ฐฌ๊ฐ์ง |
@@ -0,0 +1,519 @@
+import React, { Component } from 'react';
+import * as d3 from 'd3';
+import drawData from './Module/loadHandle';
+import FilterContainer from './Components/FilterContainer';
+import LoginModal from './Components/LoginModal';
+import DrawContainer from './Components/DrawContainer';
+import './l... | JavaScript | `closeFn` ์ด๋ ๊ฒ postfix๋ก ๋ค์ด๋ฐํ๋ ๊ฒ๋ ๋ค๋ฅธ ํจ์๋ค๊ณผ๋ ๋ค๋ฅธ ๋ฐฉ์์ผ๋ก ์ฒ๋ฆฌ๋์๋ค์.
ํต์ผ์ฑ์ ์ํด ๊ทธ๋ฅ ๋ผ๋๊ฒ ์ข๊ฒ ์.
`onClose` ์ ๋๋, ํน์ ์๋์ชฝ์ `handle~` ์ด๋ฐ์์ผ๋ก ์ผ์ผ๋ `handleToggle` ๋ญ ์ด๋ฐ์์ด์ด๋ ์ข๊ฒ ๊ณ ์. |
@@ -0,0 +1,62 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import Drawing from './Drawing';
+import '../less/Toolbox.less';
+
+class DrawContainer extends Component {
+ static propTypes = {
+ drawingData: PropTypes.array.isRequired,
+ mapLoad: PropTypes.ob... | JavaScript | less ๋ก ๋นผ๋ด๊ธฐ |
@@ -0,0 +1,62 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import Drawing from './Drawing';
+import '../less/Toolbox.less';
+
+class DrawContainer extends Component {
+ static propTypes = {
+ drawingData: PropTypes.array.isRequired,
+ mapLoad: PropTypes.ob... | JavaScript | {``} ๋ก ๊ฐ์ ํ์๊ฐ ์์ |
@@ -0,0 +1,438 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import '../less/Drawing.less';
+import Button from '../Module/Button';
+import Line from '../CustomOverlay/Line';
+import Arrow from '../CustomOverlay/Arrow';
+import Circle from '../CustomOverlay/Circle';
+import ... | JavaScript | key ์ ์ ์๋์์ |
@@ -0,0 +1,438 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import '../less/Drawing.less';
+import Button from '../Module/Button';
+import Line from '../CustomOverlay/Line';
+import Arrow from '../CustomOverlay/Arrow';
+import Circle from '../CustomOverlay/Circle';
+import ... | JavaScript | ์์๋ก ๋บ๊ฒ.
๊ณ ์ ๋ ๊ฐ์ด๋ผ๋ฉด state๋ก ์ ์ํ ํ์์์. |
@@ -0,0 +1,438 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import '../less/Drawing.less';
+import Button from '../Module/Button';
+import Line from '../CustomOverlay/Line';
+import Arrow from '../CustomOverlay/Arrow';
+import Circle from '../CustomOverlay/Circle';
+import ... | JavaScript | icons์ ๋์ํ๋ overlay ์ ํํ์ธ๊ฑฐ ๊ฐ์๋ฐ ์์๋ก ๋นผ์
`const SHAPES = [{ icons: 'line', overlay: Line }, ...]` ์ด๋ฐ์์ผ๋ก ์ ์ํ๋๊ฒ ์ข๊ฒ ์. |
@@ -0,0 +1,438 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import '../less/Drawing.less';
+import Button from '../Module/Button';
+import Line from '../CustomOverlay/Line';
+import Arrow from '../CustomOverlay/Arrow';
+import Circle from '../CustomOverlay/Circle';
+import ... | JavaScript | break; ์ํ๋ฉด ๋ฐฐ์ด ๊ณ์ ์ํํจ. |
@@ -0,0 +1,96 @@
+import React, { Component } from 'react';
+import '../less/Filter.less';
+import PropTypes from 'prop-types';
+import FilterBox from './FilterBox';
+import * as constants from '../constants';
+
+class Filter extends Component {
+ static propTypes = {
+ MyInfoButton: PropTypes.bool.is... | JavaScript | ์์... |
@@ -0,0 +1,96 @@
+import React, { Component } from 'react';
+import '../less/Filter.less';
+import PropTypes from 'prop-types';
+import FilterBox from './FilterBox';
+import * as constants from '../constants';
+
+class Filter extends Component {
+ static propTypes = {
+ MyInfoButton: PropTypes.bool.is... | JavaScript | css๋ก ๋นผ๋ด๊ธฐ |
@@ -0,0 +1,96 @@
+import React, { Component } from 'react';
+import '../less/Filter.less';
+import PropTypes from 'prop-types';
+import FilterBox from './FilterBox';
+import * as constants from '../constants';
+
+class Filter extends Component {
+ static propTypes = {
+ MyInfoButton: PropTypes.bool.is... | JavaScript | ๊ฐ์ํ์ ์์ |
@@ -0,0 +1,41 @@
+import { useState, useCallback } from 'react';
+import APIError from '../../api/apiError';
+
+interface UseFetchProps<TData> {
+ queryFn: () => Promise<TData>;
+ onError?: (error: APIError) => Promise<unknown> | unknown;
+}
+
+interface UseFetchResult<TData> {
+ query: () => Promise<void>;
+ isLoa... | TypeScript | hooks ๋๋ ํ ๋ฆฌ๋ฅผ components ๋๋ ํ ๋ฆฌ ๋ฐ์ผ๋ก ์ด๋์์ผ์ผ ํ์ง ์์๊น์~? |
@@ -0,0 +1,80 @@
+import { useEffect, useRef, useState } from 'react';
+import { LowerArrow, UpperArrow } from './Arrows';
+import * as S from './style';
+
+interface Option {
+ content: string;
+ value: string;
+}
+
+interface DropdownProps {
+ size: S.Size;
+ options: Option[];
+ defaultContent: string;
+ onSel... | Unknown | select ํ๊ทธ๋ฅผ ์ฌ์ฉํ์ง ์๊ณ ์ง์ ๋ฆฌ์คํธ๋ก ๋ง๋๋ ์ ์ฑ์ด ๋๋จํด์ :> |
@@ -0,0 +1,90 @@
+import { useEffect, useState } from 'react';
+import { SortOrder, SortType } from '../../api/types';
+import {
+ INITIAL_PAGE_NUMBER,
+ INITIAL_PAGE_SIZE,
+ PAGE_SIZE,
+} from '../../constants/paginationRules';
+import { Category, Product } from '../../types';
+import { productQueries } from './que... | TypeScript | ๋ฆฌ๋ทฐ ๊ฐ์ด๋์ ๋ฐ๋ผ ๋ฐ์ดํฐ ํ์นญ ๋ก์ง ๋ถ๋ถ์ ์กฐ๊ธ ๋ ๊ฐ์ ํ๋ค๋ฉด ์ข๊ฒ ๋๋ฐ์,
์ฌ์ค ์ ๋ ๋ชจ๋ฅด๊ฒ ์ด์ ๊ฐ์ด ๊ณ ๋ฏผํด๋ณด์์~~ |
@@ -11,13 +11,19 @@
"test": "jest"
},
"dependencies": {
+ "identity-obj-proxy": "^3.0.0",
+ "jest-svg-transformer": "^1.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^4.0.13",
+ "react-router-dom": "^6.23.1",
"recoil": "^0.7.7",
- "styled-component... | Unknown | ์ด๊ฑด ์ด๋์ ์ฐ์๋์ง ๊ถ๊ธํด์~~ |
@@ -0,0 +1,18 @@
+import * as Styled from './style';
+
+interface HeaderProps {
+ title: string;
+ onClick?: () => void;
+}
+
+const Header = ({ title, onClick }: HeaderProps) => {
+ return (
+ <Styled.Header>
+ <Styled.AppTitle onClick={() => onClick && onClick()}>
+ {title}
+ </Styled.AppTitle>... | Unknown | ๊ทธ๋ฅ onClick์ ๋ฃ์ด์ค๋ ๊ด์ฐฎ์ ๊ฒ ๊ฐ์์! |
@@ -0,0 +1,73 @@
+import { CartItem } from '../../type';
+import * as Styled from './style';
+import CheckedBox from '../assets/CheckedBox.svg';
+import UnCheckedBox from '../assets/UnCheckedBox.svg';
+import PlusButton from '../assets/PlusButton.svg';
+import MinusButton from '../assets/MinusButton.svg';
+import BinBu... | Unknown | ์ ๋ ์ธ๋ถ์์ ํจ์๋ฅผ ์ฃผ์
๋ฐ์ ๋, ์ต๋ํ ์ธ์์ ๋ฐํ๊ฐ ํ์
์ ์ฃผ์ง ์์ผ๋ ค๊ณ ํด์.( ()=>void)
์ฌ์ฉ์ฒ์์์ ์์ ๋๋ฅผ ๋์ด๊ธฐ ์ํจ์ธ๋ฐ์.
ํด์๋ ํจ์๋ฅผ ์ฃผ์
๋ฐ์ ๋ ๊ทธ ํจ์์ ์ธ์ ํ์
์ ์ฃผ๋ ๊ฒ ๊ฐ์์. ๊ทธ๋ ๊ฒํ๋ ์ด์ ๊ฐ ์์๊น์??(๊ทผ๋ฐ ์๋ง ๊ฐ์ธ ์ทจํฅ์ ์์ญ์ผ๋ฏ..?) |
@@ -0,0 +1,68 @@
+import { CartItem } from '../../type';
+import Item from './Item';
+import * as Styled from './style';
+import CheckedBox from '../assets/CheckedBox.svg';
+import UnCheckedBox from '../assets/UnCheckedBox.svg';
+import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil';
+import { Sele... | Unknown | ์๋ง ์ด tryCatch ๋ฌธ์์๋ ๋คํธ์ํฌ ์๋ฌ๋ฅผ ์ปค๋ฒํ๊ธฐ ์ํด ์ด๋ฐ์์ผ๋ก ์์ฑํ ๊ฒ ๊ฐ์๋ฐ์. updateCartItem์ ๋ฐ์ผ๋ก ๋นผ๋ฉด ์๋ฌ ํธ๋ค๋ง์ด ์กฐ๊ธ ๋ ๋ช
ํํด์ง ๊ฒ ๊ฐ์์.
๋คํธ์ํฌ ์๋ฌ๊ฐ ๋ฌ์ ๊ฒฝ์ฐ์๋ catch๋ฌธ์์ return์ ํ๋ฉด ์ํ๋ ๊ฒฐ๊ณผ๊ฐ ๋์ฌ ์ ์์ ๊ฒ์ด๋ผ๊ณ ์๊ฐํด์. |
@@ -0,0 +1,68 @@
+import { CartItem } from '../../type';
+import Item from './Item';
+import * as Styled from './style';
+import CheckedBox from '../assets/CheckedBox.svg';
+import UnCheckedBox from '../assets/UnCheckedBox.svg';
+import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil';
+import { Sele... | Unknown | ๊ทธ๋ฆฌ๊ณ ์ด๋ ๊ฒ ์๋ฌ์ปจํธ๋กค์ ํ๋๊น ๋คํธ์ํฌ ์๋ฌ๊ฐ ๋ฌ์ ๋ ์๋ ๋ฐ์์ด ์๋๋ ํจ๊ณผ๊ฐ ์๋ค์!
๋๊ด์ ์
๋ฐ์ดํธ๋ ๋์ง ์์ง๋ง ์ด๊ฒ๋ ์ด๊ฒ ๋๋ฆ์ ํจ๊ณผ๊ฐ ์์ ๊ฒ ๊ฐ๋ค๋ ์๊ฐ์ด ๋ค์ด์! |
@@ -0,0 +1,68 @@
+import { CartItem } from '../../type';
+import Item from './Item';
+import * as Styled from './style';
+import CheckedBox from '../assets/CheckedBox.svg';
+import UnCheckedBox from '../assets/UnCheckedBox.svg';
+import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil';
+import { Sele... | Unknown | ์ญ์ ๊ธฐ๋ฅ์ด ์ ๋์ํ๋ ์ง ๊ถ๊ธํด์..
์ฝ๋๋ง ๋ดค์ ๋์๋ ์ญ์ ๋ฅผ ํ๋ฉด ๋ชจ๋ ์์ดํ
์ด ๋ค ์ญ์ ๋ ๊ฒ ๊ฐ๋ค๋ ๋๋์ด ๋ค์ด์์ |
@@ -0,0 +1,549 @@
+import json
+import os
+from typing import List, Tuple
+import requests
+import re
+import groq
+import logging
+from review_config import (
+ IGNORED_EXTENSIONS,
+ IGNORED_FILES,
+ IMPORTANT_FILE_CHANGE_THRESHOLD,
+ MAX_COMMENTS_PER_FILE
+)
+
+from scripts.review_prompt import (
+ ... | Python | AI Code Review:
๋ค์์ ๊ฐ ํญ๋ชฉ์ ๋ํด ๋ฌธ์ ์ ์ ์ง์ ํ๊ณ ๊ฐ์ ๋ฐฉ์์ ์ ์ํฉ๋๋ค.
**1. Pre-condition Check**
* `github_token` ๋ณ์์ ์ํ๋ฅผ ํ์ธํด์ผ ํฉ๋๋ค. ํ์ฌ `os.environ['GITHUB_TOKEN']`๊ฐ None์ด๋ฉด ์์ธ๊ฐ ๋ฐ์ใใพใ. `github_token` ๋ณ์๋ ํ๊ฒฝ ๋ณ์๋ก ์ค์ ๋์ด์ผ ํ๋ฉฐ, None์ด๋ฉด ์ฝ๋ ์๋ํ์ง ์์ต๋๋ค.
* `repo` ๋ณ์์ ์ํ๋ฅผ ํ์ธํด์ผ ํฉ๋๋ค. ํ์ฌ `os.environ['GITHUB_REPOSITORY']`๊ฐ None์ด๋ฉด ์์ธ๊ฐ ๋ฐ์ํฉ๋๋ค. `repo` ๋ณ์๋ ... |
@@ -0,0 +1,60 @@
+name: AI Code Review
+
+on:
+ pull_request:
+ types: [opened, synchronize]
+
+permissions:
+ contents: read
+ pull-requests: write
+
+jobs:
+ code-review:
+ runs-on: ubuntu-latest
+ # runs-on: self-hosted
+
+ steps:
+ - uses: actions/checkout@v4
+
+ # - name: Set Python Pat... | Unknown | AI Code Review:
1. Pre-condition Check:
- ํจ์๋ ๋ฉ์๋๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์๋ํ๊ธฐ ์ํด ํ์ํ ๋ณ์์ ์ํ๋ ๊ฐ์ ๋ฒ์๋ฅผ ๊ฐ์ง๊ณ ์๋์ง ๊ฒ์ฌ
๋ฌธ์ ์ :
- ํ์ฌ ์ฝ๋๋ GITHUB_TOKEN์ ์ฌ์ฉํ์ฌ AI Code Review๋ฅผ ์ํํฉ๋๋ค. ํ์ง๋ง GITHUB_TOKEN์ secrets์ ๅญ๊ณ ์๋ secretes.GITHUB_TOKEN์ ๊ฐ์ด ์ฌ๋ฐ๋ฅธ์ง ํ์ธ๋์ง ์์ต๋๋ค.
- ๋ค๋ฅธ ๋ณ์๋ ๊ฐ์ด ์ฌ๋ฐ๋ฅด๊ฒ ์ค์ ๋์ด ์๋์ง ํ์ธ๋์ง ์์ต๋๋ค.
๊ฐ์ ๋ฐฉ์:
- GITHUB_TOKEN์ ๊ฐ์ด ์ฌ๋ฐ๋ฅธ์ง ํ์ธํ... |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | AI Code Review:
1. Pre-condition Check:
๋ฌธ์ ์ : ์ฝ๋๋ ๋ณ์์ ์ํ๋ ๊ฐ์ ๋ฒ์๋ฅผ ๊ฒ์ฌํ์ง ์๊ณ directly ์ฌ์ฉํ๋ ๊ฒฝ์ฐ๊ฐ ๋ง์ต๋๋ค.
๊ฐ์ ๋ฐฉ์: ํจ์๋ ๋ฉ์๋์์ ํ์ํ ๋ณ์์ ์ํ๋ ๊ฐ์็ฏ์๋ฅผเธเธฃเธงเธเธชเธญเธํ๊ณ , ํ์ํ ๊ฒฝ์ฐ ์์ธ ์ฒ๋ฆฌ๋ rร ng์ ๋ฅผ ์ฌ์ฉํฉ๋๋ค. ์๋ฅผ ๋ค์ด, ์ซ์๊ฐ negative๋ก ๋์ฌ ์ ์๋์ง ํ์ธํ๊ธฐ ์ํด `if` ๊ตฌ๋ฌธ๊ณผ `try-except` ๋ธ๋ก์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
```python
def example_function(num):
if num < 0:
r... |
@@ -0,0 +1,549 @@
+import json
+import os
+from typing import List, Tuple
+import requests
+import re
+import groq
+import logging
+from review_config import (
+ IGNORED_EXTENSIONS,
+ IGNORED_FILES,
+ IMPORTANT_FILE_CHANGE_THRESHOLD,
+ MAX_COMMENTS_PER_FILE
+)
+
+from scripts.review_prompt import (
+ ... | Python | ## .github/scripts/ai_code_review.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ GitHub Actions๋ฅผ ํตํด PR(ํ ใชใฏใจในใ)์ ๊ฒํ ํ๊ณ , ๋ฆฌ๋ทฐ ์ฝ๋ฉํธ๋ฅผ ๊ฒ์ํ๋ ์คํฌ๋ฆฝํธ์
๋๋ค. ์ฃผ์ ๊ธฐ๋ฅ์ผ๋ก๋ PR ํ์ผ์ ๊ฐ์ ธ์์ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์ํํ๊ณ , ์ค์ ํ์ผ์ ๋ํ ์์ธ ๋ฆฌ๋ทฐ๋ฅผ ์ํํ๋ฉฐ, ๋ผ์ธ ๋ณ ์ฝ๋ฉํธ๋ฅผ ๊ฒ์ํ๋ ๋ฑ์ด ์์ต๋๋ค.
### ์ข์ ์
* ์คํฌ๋ฆฝํธ๋ GitHub API๋ฅผ ์ฌ์ฉํ์ฌ PR ํ์ผ์ ๊ฐ์ ธ์์ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์ํํ๊ณ , ๋ฆฌ๋ทฐ ์ฝ๋ฉํธ๋ฅผ ๊ฒ์ํ๋ ๋ฑ ์๋ํ๋ ์ฝ๋ ๋ฆฌ๋ทฐ ํ๋ก์ธ์ค๋ฅผ ๊ตฌํํ๊ณ ์์ต๋๋ค.
* ์ค์ ํ์ผ์ ๋ํ ์์ธ ๋ฆฌ... |
@@ -0,0 +1,60 @@
+name: AI Code Review
+
+on:
+ pull_request:
+ types: [opened, synchronize]
+
+permissions:
+ contents: read
+ pull-requests: write
+
+jobs:
+ code-review:
+ runs-on: ubuntu-latest
+ # runs-on: self-hosted
+
+ steps:
+ - uses: actions/checkout@v4
+
+ # - name: Set Python Pat... | Unknown | ## .github/workflows/code-review.yml ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ GitHub Actions ์ํฌํ๋ก์ฐ๋ฅผ ์ ์ํ๋ฉฐ, Pull Request ์ด๋ฒคํธ์ ๋ํ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์๋ํํฉ๋๋ค. ์ํฌํ๋ก์ฐ๋ Ubuntu ์ต์ ๋ฒ์ ์์ ์คํ๋๋ฉฐ, Python 3.x ํ๊ฒฝ์ ์ค์ ํ๊ณ , ์์กด์ฑ์ ์ค์นํ๊ณ , AI ์ฝ๋ ๋ฆฌ๋ทฐ ์คํฌ๋ฆฝํธ๋ฅผ ์คํํฉ๋๋ค.
### ์ข์ ์
* ์ํฌํ๋ก์ฐ๋ Pull Request ์ด๋ฒคํธ์ ๋ํ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์๋ํํ์ฌ ๊ฐ๋ฐ ํ๋ก์ธ์ค๋ฅผ ํจ์จ์ ์ผ๋ก ๊ฐ์ ํฉ๋๋ค.
* Python 3.x ํ๊ฒฝ์ ์ค์ ํ๊ณ , ์์กด์ฑ์ ์ค์นํ์ฌ ์ฝ๋ ๋ฆฌ๋ทฐ ... |
@@ -25,3 +25,4 @@ flake8-comprehensions
flake8-pytest-style
isort
mypy
+groq
\ No newline at end of file | Unknown | ## app/backend/requirements.txt ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
app/backend/requirements.txt ํ์ผ์ Python ํ๋ก์ ํธ์ ๋ฐฑ์๋ ์ข
์์ฑ ๋ชฉ๋ก์ ์ ์ํฉ๋๋ค. ์ด ํ์ผ์๋ ํ๋ก์ ํธ์์ ์ฌ์ฉํ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ํจํค์ง์ ๋ฒ์ ์ด ํฌํจ๋์ด ์์ต๋๋ค.
### ์ข์ ์
- ํ๋ก์ ํธ์ ์ข
์์ฑ์ ๋ช
ํํ๊ฒ ์ ์ํ๊ณ ์์ต๋๋ค.
- ๊ฐ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ํจํค์ง์ ๋ฒ์ ์ ์ง์ ํ์ฌ ํ๋ก์ ํธ์ ์์ ์ฑ์ ๋ณด์ฅํฉ๋๋ค.
- ๋ค์ํ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ํจํค์ง๋ฅผ ์ฌ์ฉํ์ฌ ํ๋ก์ ํธ์ ๊ธฐ๋ฅ์ ํ์ฅํ๊ณ ์์ต๋๋ค.
### ๊ฐ์ ํ ์
- ์ผ๋ถ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ํจํค์ง์ ๋ฒ์ ์ด ๋ช
์... |
@@ -2,7 +2,7 @@
from dotenv import load_dotenv
# load .env file
-load_dotenv()
+load_dotenv('app/backend/.env')
from pydantic import (
PostgresDsn,
@@ -73,6 +73,9 @@ class Settings(BaseSettings):
# ALGORITHM : str
# ACCESS_TOKEN_EXPIRE_MINUTES : int
+ # Groq API
+ GROQ_API_KEY: str
+
... | Python | ## app/backend/src/main/core/config.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ ํ๋ก์ ํธ์ ์ค์ ์ ์ ์ํ๊ณ ๊ด๋ฆฌํ๋ ์ญํ ์ ํฉ๋๋ค. ํ๋ก์ ํธ์ ํ๊ฒฝ ๋ณ์๋ฅผ ๋ก๋ํ๊ณ , ์ค์ ํด๋์ค๋ฅผ ์ ์ํ์ฌ ์ค์ ๊ฐ์ ๊ด๋ฆฌํฉ๋๋ค.
### ์ข์ ์
* ํ๋ก์ ํธ์ ์ค์ ์ ๋ณ๋์ ํ์ผ๋ก ๋ถ๋ฆฌํ์ฌ ๊ด๋ฆฌํ๊ณ ์์ต๋๋ค. ์ด๋ ํ๋ก์ ํธ์ ์ฝ๋๋ฅผ ๊น๋ํ๊ฒ ์ ์งํ๊ณ , ์ค์ ๊ฐ์ ์ฝ๊ฒ ๊ด๋ฆฌํ ์ ์๋๋ก ํฉ๋๋ค.
* Pydantic์ ์ฌ์ฉํ์ฌ ์ค์ ํด๋์ค๋ฅผ ์ ์ํ๊ณ ์์ต๋๋ค. ์ด๋ ์ค์ ๊ฐ์ ํ์
์ ๊ฐ์ ํ๊ณ , ์ ํจ์ฑ์ ๊ฒ์ฆํ์ฌ ์ค๋ฅ๋ฅผ ๋ฐฉ์งํ ์ ์์ต๋๋ค.
* dotenv๋ฅผ... |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | ## scripts/review_prompt.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ ์ฝ๋ ๋ฆฌ๋ทฐ์ ๋ํ ํ๋กฌํํธ๋ฅผ ์ ๊ณตํ๋ ๊ธฐ๋ฅ์ ๋ด๋นํฉ๋๋ค. ๋ค์ํ ์ ํ์ ๋ฆฌ๋ทฐ ํ๋กฌํํธ๋ฅผ ์ ์ํ๊ณ , ํ์ํ ๋ฐ์ดํฐ๋ฅผ ํฌํจํ์ฌ ํ๋กฌํํธ๋ฅผ ๋ฐํํ๋ ํจ์๋ค์ ์ ๊ณตํฉ๋๋ค.
### ์ข์ ์
- ์ฝ๋๋ ๊ฐ๋
์ฑ์ด ์ข๊ณ , ๊ฐ ํจ์์ ์ญํ ์ด ๋ช
ํํฉ๋๋ค.
- ํ๋กฌํํธ ํ
ํ๋ฆฟ์ string.format() ๋ฉ์๋๋ฅผ ์ฌ์ฉํ์ฌ ๋์ ์ผ๋ก ๋ฐ์ดํฐ๋ฅผ ํฌํจํ ์ ์์ต๋๋ค.
- ํจ์๋ช
๊ณผ ๋ณ์๋ช
์ด ๋ช
ํํ๊ฒ ์ ์๋์ด ์์ต๋๋ค.
### ๊ฐ์ ํ ์
- ํจ์์ ์ญํ ์ด ๋ช
ํํ์ง๋ง, ํจ์์ ์ค๋ช
๊ณผ ๋ํ๋จผํธ๊ฐ ์์ต๋๋ค.... |
@@ -0,0 +1,549 @@
+import json
+import os
+from typing import List, Tuple
+import requests
+import re
+import groq
+import logging
+from review_config import (
+ IGNORED_EXTENSIONS,
+ IGNORED_FILES,
+ IMPORTANT_FILE_CHANGE_THRESHOLD,
+ MAX_COMMENTS_PER_FILE
+)
+
+from scripts.review_prompt import (
+ ... | Python | ## ์ ์ฒด ์ฝ๋ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ์คํฌ๋ฆฝํธ๋ GitHub PR ๋ฆฌ๋ทฐ๋ฅผ ์ํ ์ฝ๋ ๋ฆฌ๋ทฐ ์๋ํ ํด์
๋๋ค. ์ฃผ์ ๊ธฐ๋ฅ์ผ๋ก๋ PR์ ํฌํจ๋ ํ์ผ์ ์ค์๋๋ฅผ ํ๋จํ๊ณ , ์ค์ ํ์ผ์ ๋ํ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์์ฑํ์ฌ PR ์ฝ๋ฉํธ๋ก ๊ฒ์ํ๋ ๊ฒ์
๋๋ค.
### ์ข์ ์
1. PR ๋ฆฌ๋ทฐ ํ๋ก์ธ์ค๋ฅผ ์๋ํํ์ฌ ๋ฆฌ๋ทฐ์ด์ ์
๋ฌด๋์ ์ค์ฌ ์ค๋๋ค.
2. ์ค์ ํ์ผ์ ํ๋จํ์ฌ ๋ฆฌ๋ทฐ์ ํจ์จ์ฑ์ ๋์
๋๋ค.
3. GitHub API๋ฅผ ์ฌ์ฉํ์ฌ PR ์ฝ๋ฉํธ๋ฅผ ์๋์ผ๋ก ์์ฑํ์ฌ ๋ฆฌ๋ทฐ ํ๋ก์ธ์ค๋ฅผ ๊ฐ์ํํฉ๋๋ค.
### ๊ฐ์ ํ ์
1. ์ฝ๋์ ๊ฐ๋
์ฑ์ ๋์ด๊ธฐ ์ํด ํจ์ ๋ถ๋ฆฌ ๋ฐ ์ฃผ์ ์ถ๊ฐ๊ฐ ... |
@@ -0,0 +1,27 @@
+# ๋ฆฌ๋ทฐ์์ ์ ์ธํ ํ์ผ ๋ชฉ๋ก
+IGNORED_FILES = [
+ '.gitignore',
+ 'requirements.txt',
+ 'docker-compose.yml',
+ 'Dockerfile',
+ 'setup.cfg',
+ 'pyproject.toml',
+ '.env.example',
+ 'README.md',
+ 'LICENSE',
+]
+
+# ๋ฆฌ๋ทฐ์์ ์ ์ธํ ํ์ผ ํ์ฅ์
+IGNORED_EXTENSIONS = [
+ '.md',
+ '.txt',
+ ... | Python | ## .github/scripts/review_config.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ GitHub ๋ฆฌ๋ทฐ์ ๋ํ ์ค์ ์ ๊ด๋ฆฌํ๋ ๋ฐ ์ฌ์ฉ๋ฉ๋๋ค. ์ฆ, ๋ฆฌ๋ทฐ์์ ์ ์ธํ ํ์ผ ๋ชฉ๋ก, ํ์ผ ํ์ฅ์, ์ค์ ํ์ผ ํ๋จ ๊ธฐ์ค ๋ฑ์ ์ ์ํฉ๋๋ค.
### ์ข์ ์
* ํ์ผ์ ๊ฐ๋
์ฑ ์๊ฒ ๊ตฌ์กฐํํ๊ณ ์์ต๋๋ค.
* ๋ณ์๋ช
์ด ๋ช
ํํ๊ณ ์ดํดํ๊ธฐ ์ฝ์ต๋๋ค.
* ์ฃผ์์ด ์ ์ ํ๊ฒ ์์ฑ๋์ด ์์ต๋๋ค.
### ๊ฐ์ ํ ์
* IGNORED_FILES ๋ชฉ๋ก์ด ๋๋ฌด ๊ธธ์ด ์ฝ๋ ๊ฐ๋
์ฑ์ ํด์นฉ๋๋ค. ์ด๋ฅผ ๊ฐ์ ํ์ฌ ๋ ๊ฐ๋
์ฑ ์๊ฒ ์์ฑํ ์ ์์ต๋๋ค.
* IMPORTANT_FILE_CHA... |
@@ -2,7 +2,7 @@
from dotenv import load_dotenv
# load .env file
-load_dotenv()
+load_dotenv('app/backend/.env')
from pydantic import (
PostgresDsn,
@@ -73,6 +73,9 @@ class Settings(BaseSettings):
# ALGORITHM : str
# ACCESS_TOKEN_EXPIRE_MINUTES : int
+ # Groq API
+ GROQ_API_KEY: str
+
... | Python | ## app/backend/src/main/core/config.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ ํ๋ก์ ํธ์ ์ค์ ์ ๊ด๋ฆฌํ๋ ์ญํ ์ ํฉ๋๋ค. ์ค์ ์ `.env` ํ์ผ์์ ์ฝ์ด๋ค์ฌ Pydantic์ `BaseSettings` ํด๋์ค๋ฅผ ํตํด ์ ํจ์ฑ ๊ฒ์ฌ๋ฅผ ์ํํ๊ณ , ์ค์ ์ ์ ์ฅํ๋ ํด๋์ค `Settings`๋ฅผ ์ ์ํฉ๋๋ค.
### ์ข์ ์
* `.env` ํ์ผ์ ์ฌ์ฉํ์ฌ ์ค์ ์ ๊ด๋ฆฌํ๋ ๋ฐฉ์์ ์ผ๋ฐ์ ์ด๊ณ ํธ๋ฆฌํฉ๋๋ค.
* Pydantic์ `BaseSettings` ํด๋์ค๋ฅผ ์ฌ์ฉํ์ฌ ์ค์ ์ ์ ํจ์ฑ ๊ฒ์ฌ๋ฅผ ์ํํ๋ ๋ฐฉ์์ ์์ ํ๊ณ ๊ฐ๋ ฅํฉ๋๋ค.
* ์ค์ ์ ์ ์ฅํ๋... |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | ## scripts/review_prompt.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ ์ฝ๋ ๋ฆฌ๋ทฐ์ ๋ํ ํ๋กฌํํธ๋ฅผ ์ ๊ณตํ๋ ํจ์๋ค์ ์ ์ํฉ๋๋ค. ํ๋กฌํํธ๋ ์ ์ฒด ์ฝ๋ ๋ฆฌ๋ทฐ, ํ์ผ ๋ฆฌ๋ทฐ, ๋ผ์ธ๋ณ ์ฝ๋ฉํธ, ์ ์ฒด ๋ฆฌ๋ทฐ ์์ฝ์ ์ํ ํ
ํ๋ฆฟ์ ์ ๊ณตํฉ๋๋ค.
### ์ข์ ์
* ํจ์๋ช
์ด ๋ช
ํํ๊ณ ์ง๊ด์ ์
๋๋ค.
* ํ๋กฌํํธ ํ
ํ๋ฆฟ์ด ์ ๋ฆฌ๋์ด ์์ต๋๋ค.
* ํจ์๊ฐ ๋
๋ฆฝ์ ์ด๋ฉฐ ์ฌ์ฌ์ฉ์ด ๊ฐ๋ฅํฉ๋๋ค.
### ๊ฐ์ ํ ์
* ํจ์์ ๋ํ ๋ฌธ์ํ๊ฐ ๋ถ์กฑํฉ๋๋ค. ํจ์์ ์ค๋ช
๊ณผ ํ๋ผ๋ฏธํฐ์ ๋ํ ์ ๋ณด๊ฐ ํ์ํฉ๋๋ค.
* ํ๋กฌํํธ ํ
ํ๋ฆฟ์ ๋ํ ์ค๋ช
์ด ํ์ํฉ๋๋ค. ์๋ฅผ ๋ค์ด, `{code}`,... |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | REVIEW_PROMPT ๋ณ์์ ์ด๋ฆ์ด ๋๋ฌด ๊ธธ์ต๋๋ค. REVIEW_TEMPLATE๋ก ๋ฐ๊ฟ ์ ์์ต๋๋ค. |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | FILE_REVIEW_PROMPT ๋ณ์์ ์ด๋ฆ์ด ๋๋ฌด ๊ธธ์ต๋๋ค. FILE_TEMPLATE๋ก ๋ฐ๊ฟ ์ ์์ต๋๋ค. |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | LINE_COMMENTS_PROMPT ๋ณ์์ ์ด๋ฆ์ด ๋๋ฌด ๊ธธ์ต๋๋ค. LINE_TEMPLATE๋ก ๋ฐ๊ฟ ์ ์์ต๋๋ค. |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | get_review_prompt ํจ์์ ์ด๋ฆ์ด ๋๋ฌด ์ผ๋ฐ์ ์
๋๋ค. get_review_template์ผ๋ก ๋ฐ๊ฟ ์ ์์ต๋๋ค. |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | get_file_review_prompt ํจ์์ ์ด๋ฆ์ด ๋๋ฌด ์ผ๋ฐ์ ์
๋๋ค. get_file_template์ผ๋ก ๋ฐ๊ฟ ์ ์์ต๋๋ค. |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | get_line_comments_prompt ํจ์์ ์ด๋ฆ์ด ๋๋ฌด ์ผ๋ฐ์ ์
๋๋ค. get_line_template์ผ๋ก ๋ฐ๊ฟ ์ ์์ต๋๋ค. |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | get_total_comments_prompt ํจ์์ ์ด๋ฆ์ด ๋๋ฌด ์ผ๋ฐ์ ์
๋๋ค. get_total_template์ผ๋ก ๋ฐ๊ฟ ์ ์์ต๋๋ค. |
@@ -0,0 +1,549 @@
+import json
+import os
+from typing import List, Tuple
+import requests
+import re
+import groq
+import logging
+from review_config import (
+ IGNORED_EXTENSIONS,
+ IGNORED_FILES,
+ IMPORTANT_FILE_CHANGE_THRESHOLD,
+ MAX_COMMENTS_PER_FILE
+)
+
+from scripts.review_prompt import (
+ ... | Python | ## .github/scripts/ai_code_review.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ GitHub Actions์ ์ผ๋ถ๋ก ๋์ํ๋ ํ์ด์ฌ ์คํฌ๋ฆฝํธ์
๋๋ค. ์ด ์คํฌ๋ฆฝํธ๋ PR(ํ ๋ฆฌํ์คํธ)์์ ๋ณ๊ฒฝ๋ ํ์ผ์ ๊ฐ์ ธ์์, ๊ฐ ํ์ผ์ ์ค์๋๋ฅผ ํ๊ฐํ ํ ์ค์ ํ์ผ์ ๋ํ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์ํํฉ๋๋ค. ์ฝ๋ ๋ฆฌ๋ทฐ๋ Groq API๋ฅผ ์ฌ์ฉํ์ฌ ์๋์ผ๋ก ์ํ๋๋ฉฐ, ๋ฆฌ๋ทฐ ๊ฒฐ๊ณผ๋ PR์ ์ฝ๋ฉํธ๋ก ๊ฒ์๋ฉ๋๋ค.
### ์ข์ ์
* ์ด ์คํฌ๋ฆฝํธ๋ PR์์ ๋ณ๊ฒฝ๋ ํ์ผ์ ์๋์ผ๋ก ๊ฐ์ ธ์์ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์ํํ๋ ๊ธฐ๋ฅ์ ์ ๊ณตํฉ๋๋ค. ์ด๊ฒ์ ๊ฐ๋ฐ์๋ค์ด ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์ํํ๋ ๋ฐ ... |
@@ -0,0 +1,27 @@
+# ๋ฆฌ๋ทฐ์์ ์ ์ธํ ํ์ผ ๋ชฉ๋ก
+IGNORED_FILES = [
+ '.gitignore',
+ 'requirements.txt',
+ 'docker-compose.yml',
+ 'Dockerfile',
+ 'setup.cfg',
+ 'pyproject.toml',
+ '.env.example',
+ 'README.md',
+ 'LICENSE',
+]
+
+# ๋ฆฌ๋ทฐ์์ ์ ์ธํ ํ์ผ ํ์ฅ์
+IGNORED_EXTENSIONS = [
+ '.md',
+ '.txt',
+ ... | Python | ## .github/scripts/review_config.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ Git ๋ฆฌ๋ทฐ์ ๊ด๋ จ๋ ์ค์ ์ ์ ์ํฉ๋๋ค. ๋ฆฌ๋ทฐ์์ ์ ์ธํ ํ์ผ ๋ชฉ๋ก, ํ์ผ ํ์ฅ์, ์ค์ ํ์ผ ํ๋จ ๊ธฐ์ค, ํ์ผ๋น ์ต๋ ์ฝ๋ฉํธ ์ ๋ฑ์ ์ค์ ํฉ๋๋ค.
### ์ข์ ์
* ํ์ผ์ด ๊ฐ๋จํ๊ณ ์ดํดํ๊ธฐ ์ฝ์ต๋๋ค.
* ๋ณ์๋ช
์ด ๋ช
ํํ๊ณ ์ผ๊ด์ ์
๋๋ค.
* ์ฃผ์ ์ค์ ํญ๋ชฉ์ด ์ ์ ๋ฆฌ๋์ด ์์ต๋๋ค.
### ๊ฐ์ ํ ์
* ํ์ผ์ ๋ํ ์ค๋ช
์ด ์์ต๋๋ค. ํ์ผ์ ๋ชฉ์ ๊ณผ ์ฌ์ฉ ๋ฐฉ๋ฒ์ ๋ํ ์ฃผ์์ ์ถ๊ฐํ ํ์๊ฐ ์์ต๋๋ค.
* ๋ณ์์ ์๋ฏธ์ ์ฌ์ฉ ์์๊ฐ ์์ต๋๋ค. ๊ฐ ๋ณ์์ ๋ํ ์ฃผ์์... |
@@ -2,7 +2,7 @@
from dotenv import load_dotenv
# load .env file
-load_dotenv()
+load_dotenv('app/backend/.env')
from pydantic import (
PostgresDsn,
@@ -73,6 +73,9 @@ class Settings(BaseSettings):
# ALGORITHM : str
# ACCESS_TOKEN_EXPIRE_MINUTES : int
+ # Groq API
+ GROQ_API_KEY: str
+
... | Python | ## app/backend/src/main/core/config.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ ๋ฐฑ์๋ ์ ํ๋ฆฌ์ผ์ด์
์ ์ค์ ์ ๊ด๋ฆฌํ๋ ๋ฐ ์ฌ์ฉ๋ฉ๋๋ค. ์ค์ ์ ํ๊ฒฝ ๋ณ์์์ ๋ก๋๋๋ฉฐ, ์ค์ ํญ๋ชฉ์ `Settings` ํด๋์ค์ ์ ์๋์ด ์์ต๋๋ค.
### ์ข์ ์
* ์ด ํ์ผ์ ์ค์ ์ ๊ด๋ฆฌํ๋ ๋ฐ ์ฌ์ฉ๋๋ `Settings` ํด๋์ค๋ฅผ ์ ๊ณตํ๋ฉฐ, ํ๊ฒฝ ๋ณ์์์ ์ค์ ๊ฐ์ ๋ก๋ํ๋ ๊ธฐ๋ฅ์ ์ ๊ณตํฉ๋๋ค.
* ์ค์ ํญ๋ชฉ์ ๋ช
ํํ๊ฒ ์ ์๋์ด ์์ผ๋ฉฐ, ์ค์ ํญ๋ชฉ์ ํ์
์ด ๋ช
ํํ๊ฒ ์ง์ ๋์ด ์์ต๋๋ค.
* `parse_cors` ํจ์๋ฅผ ์ฌ์ฉํ์ฌ CORS ์ค์ ๊ฐ์ ํ์ฑํ๋... |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | ## scripts/review_prompt.py ํ์ผ ๋ฆฌ๋ทฐ
### ์ฃผ์ ๊ธฐ๋ฅ
์ด ํ์ผ์ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ์ํ ํ๋กฌํํธ๋ฅผ ์ ๊ณตํ๋ ํจ์๋ค์ ์ ์ํ๊ณ ์์ต๋๋ค. ์ด ํ์ผ์ ์ฝ๋ ๋ฆฌ๋ทฐ์ ์ฌ์ฉ๋ ํ๋กฌํํธ๋ฅผ ์์ฑํ์ฌ ๋ฐํํ๋ ์ญํ ์ ํฉ๋๋ค.
### ์ข์ ์
* ์ฝ๋๊ฐ ๊ฐ๊ฒฐํ๊ณ ์ดํดํ๊ธฐ ์ฝ์ต๋๋ค.
* ํจ์๋ช
์ด ๋ช
ํํ๊ณ , ํจ์์ ์ญํ ์ด ๋ถ๋ช
ํฉ๋๋ค.
* ํ๋กฌํํธ์ ํ์์ ์ ์ํ์ฌ ์ผ๊ด์ฑ์ ์ ์งํ๊ณ ์์ต๋๋ค.
### ๊ฐ์ ํ ์
* ํจ์์ ๊ฐ ๋งค๊ฐ๋ณ์์ ๋ํ ์ค๋ช
์ด ์์ต๋๋ค.
* ํ๋กฌํํธ์ ํ์์ด ๋ณ๊ฒฝ๋ ๊ฒฝ์ฐ, ๋ชจ๋ ํจ์์์ ๋ณ๊ฒฝํด์ผ ํฉ๋๋ค.
* ์๋ฌ ํธ๋ค๋ง์ด ์์ต๋๋ค. ์๋ฅผ ๋ค์ด... |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | REVIEW_PROMPT ๋ณ์์ ์ด๋ฆ์ด ๋๋ฌด ๊ธธ๊ณ ๋ชจํธํฉ๋๋ค. ๋ ์งง๊ณ ๋ช
ํํ๊ฒ ์ ์ํ ์ ์์ต๋๋ค. |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | get_review_prompt ํจ์์ ์ด๋ฆ์ด ๋๋ฌด ๊ธธ๊ณ ๋ชจํธํฉ๋๋ค. ๋ ์งง๊ณ ๋ช
ํํ๊ฒ ์ ์ํ ์ ์์ต๋๋ค. |
@@ -0,0 +1,101 @@
+REVIEW_PROMPT = """
+You have deep knowledge and expertise in Python, FastAPI for the back end, React and Next.js for the front.
+Here is the new PR information.
+- title: {title}
+- description: {description}
+- commit messages: {commit_messages}
+- changed files: {changed_files}
+
+Please understan... | Python | FILE_REVIEW_PROMPT ๋ณ์์ ์ด๋ฆ์ด ๋๋ฌด ๊ธธ๊ณ ๋ชจํธํฉ๋๋ค. ๋ ์งง๊ณ ๋ช
ํํ๊ฒ ์ ์ํ ์ ์์ต๋๋ค. |
@@ -8,51 +8,65 @@
public class Game {
public static final String DELIMETER = "-";
+
+ public static final String CAR_NAME_DELIMETER = ",";
+
private int gameCount;
+
private Car[] cars;
public void start() {
- cars = createCar();
+
+ cars = createCar();
+
gameCount ... | Java | 
d, e ๊ฐ ์ฐ์นํ๋๋ฐ ์ ๋๋ก ์ถ๋ ฅ๋๊ณ ์์ง ์๋ค์ ๐
|
@@ -0,0 +1,25 @@
+import java.util.List;
+
+/**
+ * @author jeongheekim
+ * @date 3/27/24
+ */
+public class FormattingUtil {
+ private FormattingUtil() {}
+
+ public static String formattingResult(List<String> list) {
+ StringBuilder sb = new StringBuilder();
+ int size = list.size();
+ for ... | Java | > ๊ท์น 1: ํ ๋ฉ์๋์ ์ค์ง ํ ๋จ๊ณ์ ๋ค์ฌ์ฐ๊ธฐ(indent)๋ง ํ๋ค.
indent๊ฐ 2์ด์์ธ ๋ฉ์๋์ ๊ฒฝ์ฐ ๋ฉ์๋๋ฅผ ๋ถ๋ฆฌํ๋ฉด indent๋ฅผ ์ค์ผ ์ ์๋ค.
else๋ฅผ ์ฌ์ฉํ์ง ์์ indent๋ฅผ ์ค์ผ ์ ์๋ค.
์ธ๋ดํธ๊ฐ 2์ด์์ด๊ตฐ์ ๐ค |
@@ -0,0 +1,47 @@
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author jeongheekim
+ * @date 3/26/24
+ */
+public class Winner {
+ private List<String> winners = new ArrayList<>();
+ private int maxLength;
+
+ public void addWinner(String name) {
+ this.winners.add(name);
+ }
+
+ ... | Java | ๋ก์ง์ ๋ฌธ์ ๊ฐ ์๋๊ฒ ๊ฐ์์ ๐
์ฐ์น์๊ฐ ๋๋ฒ ์ถ๋ ฅ๋๊ณ ์์ต๋๋ค
 |
@@ -0,0 +1,47 @@
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author jeongheekim
+ * @date 3/26/24
+ */
+public class Winner {
+ private List<String> winners = new ArrayList<>();
+ private int maxLength;
+
+ public void addWinner(String name) {
+ this.winners.add(name);
+ }
+
+ ... | Java | ์๋์ฐจ์ ๊ธธ์ด๋ฅผ ๊บผ๋ด์ด ์ฒ๋ฆฌํ๊ณ ์๋ค์!
๋๋ฏธํฐ ๋ฒ์น์ ์ด๊ธ๋๊ณ ์์ต๋๋ค
๋ฉ์ธ์ง๋ฅผ ๋ณด๋ด์ด ์ฒ๋ฆฌํด๋ณด๋๊ฑด ์ด๋จ๊น์? ๐ค
https://mangkyu.tistory.com/147 |
@@ -1,7 +1,73 @@
package com.ll.nbe342team8.domain.book.book.controller;
-import org.springframework.web.bind.annotation.RestController;
+import com.ll.nbe342team8.domain.book.book.dto.BookPatchRequestDto;
+import com.ll.nbe342team8.domain.book.book.dto.BookResponseDto;
+import com.ll.nbe342team8.domain.book.book.en... | Java | - ์ ๋ฐ์ ์ผ๋ก ์
๋ ฅ ๋ฐ๋ Parameter์ ๋ํ ๊ฒ์ฆ์ด ์๋ค์. (์๋ฅผ ๋ค์ด, getAllBooks์ pageSize ๊ฐ์ผ๋ก -100์ ๋๊ธฐ๋ฉด ์ด๋ป๊ฒ ๋ ๊น์?) |
@@ -1,7 +1,73 @@
package com.ll.nbe342team8.domain.book.book.controller;
-import org.springframework.web.bind.annotation.RestController;
+import com.ll.nbe342team8.domain.book.book.dto.BookPatchRequestDto;
+import com.ll.nbe342team8.domain.book.book.dto.BookResponseDto;
+import com.ll.nbe342team8.domain.book.book.en... | Java | ์๋ง ์บ๋ฉ์ผ์ด์ค๋ฅผ ์ ์ฐ๋ ์ด์ ๊ฐ ์์๊น์?
์ด๊ฑฐ ๋๋ฌธ์ `@PathVariable` ์ด๋
ธํ
์ด์
๋ค์ ๋ถํ์ํ ์์ฑ๊ฐ์ด ๊ฐ์ด ๋ถ์ด๋ฒ๋ ธ๋ค์. |
@@ -1,7 +1,73 @@
package com.ll.nbe342team8.domain.book.book.controller;
-import org.springframework.web.bind.annotation.RestController;
+import com.ll.nbe342team8.domain.book.book.dto.BookPatchRequestDto;
+import com.ll.nbe342team8.domain.book.book.dto.BookResponseDto;
+import com.ll.nbe342team8.domain.book.book.en... | Java | ๊ทธ๋ฅ required=false ์ต์
์ ๋นผ๋ฉด ๊ตณ์ด ๋ถ๊ธฐ์ฒ๋ฆฌ๋ฅผ ์ํด๋ ๋์ง ์์๊น์? |
@@ -1,7 +1,73 @@
package com.ll.nbe342team8.domain.book.book.controller;
-import org.springframework.web.bind.annotation.RestController;
+import com.ll.nbe342team8.domain.book.book.dto.BookPatchRequestDto;
+import com.ll.nbe342team8.domain.book.book.dto.BookResponseDto;
+import com.ll.nbe342team8.domain.book.book.en... | Java | ์ ๋ฉ์๋์์๋ `long` ์ ์ฐ๊ณ , ์ฌ๊ธฐ์๋ `Long` ์ ์ฐ๋๋ฐ ํน์ ๋์ ๊ตฌ๋ถํ๋ ๋ด๋ถ์ ์ธ ์ปจ๋ฒค์
์ด ์กด์ฌํ๋๊ฑธ๊น์? |
@@ -0,0 +1,50 @@
+package com.ll.nbe342team8.domain.book.book.dto;
+
+import com.ll.nbe342team8.domain.book.category.entity.Category;
+import jakarta.validation.constraints.AssertTrue;
+import jakarta.validation.constraints.DecimalMin;
+import jakarta.validation.constraints.Min;
+import jakarta.validation.constraints.P... | Java | - Controller ์์ `@Valid` ๋ฅผ ์ ์ฐ๊ณ ์์ด์, Validation ์ด ์ํ๋์ง ์์ ๊ฒ์ผ๋ก ๋ณด์ฌ์.
- Dto๋ ๊ฐ๋ณ์ผ ํ์๊ฐ ์๊ณ , (์๋ง ์ด ํ
์คํธ๋ฅผ ๋ณด๊ณ ์ ๊ฐ ๋งํ๊ฒ ์ง๋ง) ๋ชจ๋ ์๋ฐ๋ก ๋์ด๊ฐ๋ฉด์ ๋ฐ์ดํฐ์ ๋ถ๋ณ์ฑ์ด ์์ฃผ ์ค์ํ ์ด์๋ก ๋ ์ค๋ฅธ ์ํฉ์ด์์.`@Data` ๋์ , Record๋ก ๋์ฒดํด ์ฃผ์ธ์. |
@@ -0,0 +1,50 @@
+package com.ll.nbe342team8.domain.book.book.dto;
+
+import com.ll.nbe342team8.domain.book.category.entity.Category;
+import jakarta.validation.constraints.AssertTrue;
+import jakarta.validation.constraints.DecimalMin;
+import jakarta.validation.constraints.Min;
+import jakarta.validation.constraints.P... | Java | Float์ ์ ํ๋ ๋ฌธ์ ๋ก ๊ถ์ฅ๋์ง ์์ต๋๋ค. Double๋ก ๋์ฒดํด ์ฃผ์ธ์. |
@@ -0,0 +1,50 @@
+package com.ll.nbe342team8.domain.book.book.dto;
+
+import com.ll.nbe342team8.domain.book.category.entity.Category;
+import jakarta.validation.constraints.AssertTrue;
+import jakarta.validation.constraints.DecimalMin;
+import jakarta.validation.constraints.Min;
+import jakarta.validation.constraints.P... | Java | status๋ฅผ ์ซ์๊ฐ ์๋ Enum ์ผ๋ก ๊ด๋ฆฌํ ์ ์์๊น์? |
@@ -0,0 +1,56 @@
+package com.ll.nbe342team8.domain.book.book.dto;
+
+import com.ll.nbe342team8.domain.book.book.entity.Book;
+import com.ll.nbe342team8.domain.book.category.entity.Category;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.... | Java | ์ด๋ค ๊ณณ์์๋ record๋ฅผ ์ฐ๊ณ , ์ด๋ค ๊ณณ์์๋ @Data ๋ฅผ ์ฐ๋๊ฑธ ๋ณด๋, ํ ๋ด ์ปจ๋ฒค์
์ด ์ ํํ๊ฒ ํ์ ๋์ง ์์ ๊ฒ ๊ฐ์์. |
@@ -1,40 +1,108 @@
package com.ll.nbe342team8.domain.book.book.entity;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.ll.nbe342team8.domain.book.book.dto.BookPatchRequestDto;
import com.ll.nbe342team8.domain.book.category.entity.Category;
+import com.ll.nbe342team8.domain.book.review.entity.Review... | Java | ์์์๋ `@Column` ์ ์ฐ๋๋ฐ, ์ ์ฌ๊ธฐ๋ถํฐ๋ ์์๊น์? |
@@ -1,40 +1,108 @@
package com.ll.nbe342team8.domain.book.book.entity;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.ll.nbe342team8.domain.book.book.dto.BookPatchRequestDto;
import com.ll.nbe342team8.domain.book.category.entity.Category;
+import com.ll.nbe342team8.domain.book.review.entity.Review... | Java | (์ข ์ฑ๋ฆฐ์งํ ๋ถ๋ถ์ด์์.)
์ผ์ผํ ๋ฐ๋ณต๋ฌธ ์ ์ฐ๊ณ update ํ ์ ์์๊น์? |
@@ -1,23 +0,0 @@
-package com.ll.nbe342team8.domain.book.book.review.entity;
-
-import com.ll.nbe342team8.global.jpa.entity.BaseTime;
-import jakarta.persistence.Entity;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-
-@Entity
-@Getter
-@Builder
-@No... | Java | ์ ๊ณต๋ฐฑ๋ค๋ ์ปจ๋ฒค์
์ ๋ง๊ฒ ์ ๋ฆฌํด์ฃผ์ธ์ ใ
ใ
|
@@ -1,9 +1,113 @@
package com.ll.nbe342team8.domain.book.book.service;
+import com.ll.nbe342team8.domain.book.book.dto.BookPatchRequestDto;
+import com.ll.nbe342team8.domain.book.book.dto.BookResponseDto;
+import com.ll.nbe342team8.domain.book.book.dto.ExternalBookDto;
+import com.ll.nbe342team8.domain.book.book.ent... | Java | ๊ทธ๋ฅ `sortType.getOrder` ๋ก๋ ๋์ฒด๊ฐ ๋๊ฒ ๋ค์. |
@@ -1,9 +1,113 @@
package com.ll.nbe342team8.domain.book.book.service;
+import com.ll.nbe342team8.domain.book.book.dto.BookPatchRequestDto;
+import com.ll.nbe342team8.domain.book.book.dto.BookResponseDto;
+import com.ll.nbe342team8.domain.book.book.dto.ExternalBookDto;
+import com.ll.nbe342team8.domain.book.book.ent... | Java | ๋ชจ๋ ๋ก์ง ์ ์ฒด์ pageSize์ ์ ํ์ด ์๋๋ฐ์.
๊ทธ๋ ๋ค๋ฉด ๋ง์ฝ ์ ๊ฐ pageSize=10000000 ์ ๋ฃ์ผ๋ฉด ์ด๋ป๊ฒ ๋ ๊น์? |
@@ -1,9 +1,113 @@
package com.ll.nbe342team8.domain.book.book.service;
+import com.ll.nbe342team8.domain.book.book.dto.BookPatchRequestDto;
+import com.ll.nbe342team8.domain.book.book.dto.BookResponseDto;
+import com.ll.nbe342team8.domain.book.book.dto.ExternalBookDto;
+import com.ll.nbe342team8.domain.book.book.ent... | Java | + (์ฝ๊ฐ ์ฑ๋ฆฐ์ง)
Spring ์ Page ๋ ์ค์ DB ์ฟผ๋ฆฌ์์ ์ด๋ป๊ฒ ๋๋์ง ์์๋์? ๊ทธ๊ฒ์ด ์ด๋ป๊ฒ ๋์ํ ๊น์? |
@@ -1,9 +1,113 @@
package com.ll.nbe342team8.domain.book.book.service;
+import com.ll.nbe342team8.domain.book.book.dto.BookPatchRequestDto;
+import com.ll.nbe342team8.domain.book.book.dto.BookResponseDto;
+import com.ll.nbe342team8.domain.book.book.dto.ExternalBookDto;
+import com.ll.nbe342team8.domain.book.book.ent... | Java | ์ ์ด์ ์
๋ ฅ ๊ฐ์์ id๊ฐ notnull ์์ validate ํ๋๊ฒ ๋ง์ง ์์๊น์?
๊ธฐ๋ณธ์ ์ธ validation ์ service ๋ ์ด์ด์์ ์ํํ๊ฒ ํ์ง ๋ง์์ฃผ์ธ์. |
@@ -0,0 +1,38 @@
+package com.ll.nbe342team8.domain.book.book.service;
+
+import com.ll.nbe342team8.domain.book.book.dto.ExternalBookDto;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.web.reactive.function.client.WebClient;
+
+@Se... | Java | UriComponentBuilder ์ฌ์ฉ |
@@ -0,0 +1,38 @@
+package com.ll.nbe342team8.domain.book.book.service;
+
+import com.ll.nbe342team8.domain.book.book.dto.ExternalBookDto;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.web.reactive.function.client.WebClient;
+
+@Se... | Java | Apache Commons StringUtils ์ฌ์ฉ์ ํด ๋ณด์ธ์.
`StringUtils.isEmpty(isbn13)` |
@@ -1,18 +1,47 @@
package com.ll.nbe342team8.domain.book.category.entity;
+import com.ll.nbe342team8.domain.book.book.entity.Book;
import com.ll.nbe342team8.global.jpa.entity.BaseEntity;
+import jakarta.persistence.CascadeType;
import jakarta.persistence.Entity;
+import jakarta.persistence.OneToMany;
+import jakar... | Java | ํด๋น ์นดํ
๊ณ ๋ฆฌ์ ์ฑ
์ด ํ 6๋ง๊ฑด ์๋ค๊ณ ํด ๋ด
์๋ค. ๊ทธ๋ฌ๋ฉด ์นดํ
๊ณ ๋ฆฌ๋ฅผ ์ญ์ ํ๊ฒ ๋๋ฉด ๋ฐ์ดํฐ 6๋ง๊ฑด์ด ๊ฐ์ด ์ญ์ ๋ ํ
๋ฐ์. ์ข ๋ถ์์ ํ์ง ์์๊น์? |
@@ -0,0 +1,81 @@
+package com.ll.nbe342team8.domain.book.review.controller;
+
+import com.ll.nbe342team8.domain.book.book.entity.Book;
+import com.ll.nbe342team8.domain.book.book.service.BookService;
+import com.ll.nbe342team8.domain.book.review.dto.ReviewResponseDto;
+import com.ll.nbe342team8.domain.book.review.entit... | Java | ๋ชจ๋ Response Code๊ฐ 200์ธ๊ฐ์?
HttpStatus ์ ๋ํด ์์ธํ ์์๋ณด๊ณ , ํ์ํ StatusCode๋ฅผ ์ถ๊ฐํด ์ฃผ์ธ์. |
@@ -0,0 +1,81 @@
+package com.ll.nbe342team8.domain.book.review.controller;
+
+import com.ll.nbe342team8.domain.book.book.entity.Book;
+import com.ll.nbe342team8.domain.book.book.service.BookService;
+import com.ll.nbe342team8.domain.book.review.dto.ReviewResponseDto;
+import com.ll.nbe342team8.domain.book.review.entit... | Java | Controller๊ฐ ๋์๋ Service๊ฐ ๋์๋, Builder ๋ก์ง์ ์ธ๋ถ์์ ์ฌ์ฉํ์ง ์์์ผ๋ฉด ์ข๊ฒ ์ต๋๋ค.
Builder๊ฐ ์ค์์ ์ฌ์ง๋ฅผ ์ค์ฌ์ฃผ๊ธด ํ์ง๋ง, ์ฝ๋์ ๊ธธ์ด๋ฅผ ์ธ๋ก๋ก ๋๋ฆฌ๋ ๋จ์ ์ด ์๊ณ , Builder๋ฅผ ์ธํ
ํ๋ ๋ก์ง ๋๋ฌธ์ ๋ค๋ฅธ ๋ก์ง์ ๊ฐ๋
์ฑ์ด ๋๋น ์ง๋ ๋จ์ ์ด ์์ด์. |
@@ -0,0 +1,22 @@
+package com.ll.nbe342team8.domain.book.review.type;
+
+import org.springframework.data.domain.Sort;
+
+public enum SortType {
+ CREATE_AT_DESC("createDate", Sort.Direction.DESC), // ์ต๊ทผ ๋ฑ๋ก์
+ CREATE_AT_ASC("createDate", Sort.Direction.ASC), // ๊ณผ๊ฑฐ ๋ฑ๋ก์
+ RATING_DESC("rating", Sort.Direction.DE... | Java | ๋น์ทํ ์ฝ๋๊ฐ ์๋ ๊ฒ ๊ฐ์๋ฐ์, ๋ฌถ์ ์ ์์๊น์? |
@@ -3,83 +3,63 @@
import homeTry.chatting.dto.request.ChattingMessageRequest;
import homeTry.chatting.dto.response.ChattingMessageResponse;
import homeTry.chatting.exception.badRequestException.InvalidTeamIdException;
-import homeTry.chatting.model.entity.Chatting;
import homeTry.chatting.repository.ChattingReposit... | Java | Chatting์ TeamMember์ ์ฐ๊ด๊ด๊ณ๋ฅผ ๋งบ๊ณ ์์ผ๋, TeamMember์ ๋ํ ์ ๋ณด๋ง์ ์๊ณ ์์ต๋๋ค.
Chatting์์ Team ๋๋ Member์ ๋ํ ์ ๋ณด๋ฅผ ์ป๊ณ ์ ํ๋ค๋ฉด,, TeamMemberService๋ฅผ ๋จ์ผ ์ง์
์ ์ผ๋ก ํ์ฉํ๋ฉด ์ด๋จ๊น์? ๐ฒ |
@@ -1,8 +1,12 @@
package homeTry.chatting.interceptor;
+import homeTry.chatting.exception.badRequestException.InactivatedMemberWithValidTokenException;
import homeTry.chatting.exception.badRequestException.InvalidChattingTokenException;
-import homeTry.common.auth.JwtAuth;
+import homeTry.chatting.exception.badRequ... | Java | StompInterceptor๋ ํ ํฐ ์ ๋ณด๋ฅผ ๋ณด๊ณ , ๋ฉค๋ฒ๊ฐ ์กด์ฌํ์ง ์์ผ๋ฉด,, Exception์ ๋ฑ๋๋ก ํ๋ ๊ฒ ๊ฐ์ต๋๋ค.
๊ทธ๋ ๋ค๋ฉด, stompInterceptor๋ ํ ํฐ์ด bearerToken์ธ์ง, ๋ค๋ฅธ ํ ํฐ์ ์ข
๋ฅ์ธ์ง? ์ ๋ํด์๋ ์๋ฌด๋ฐ ๊ด์ฌ์ฌ๊ฐ ์์ต๋๋ค. BearerToken์ด ์ ํจํ์ง? ๋ ๊ด์ฌ์ฌ๊ฐ ์์ต๋๋ค. ๋จ์ํ ํ์ฌ interceptor์ ๋์ด์จ ํ ํฐ ์ ๋ณด๋ฅผ ๋ณด๊ณ , ์ฐ๋ฆฌ ์ฌ์ฉ์๋ผ๋ฉด ์ธ์
์ ๊ทธ ๊ฐ์ ๋ฃ๋ ๊ฒ์ ๊ด์ฌ์ด ์์ต๋๋ค.
์ด๋ ๊ฒ ๊ฐ ํด๋์ค์ ๊ด์ฌ์ฌ๋ค์ ์๊ฐํ๋ฉฐ ์ ์ ํ๊ฒ ๋ถ๋ฆฌํ๊ณ , ์บก์ํ ํด๋ณด์๋ฉด ์ฌ๋ฏธ์์ ๊ฒ ๊ฐ์์ ๐ |
@@ -1,7 +1,20 @@
package lotto;
+import lotto.config.Configuration;
+import lotto.controller.BuyLottoController;
+import lotto.controller.LottoController;
+import lotto.dto.BuyLottoDto;
+
public class Application {
public static void main(String[] args) {
- // TODO: ํ๋ก๊ทธ๋จ ๊ตฌํ
+ Configuration config... | Java | ํ์ฌ ์์ฑํ์ controller์ service๋ฅผ ๋ชจ๋ applicationํด๋์ค์์ ์์ฑํ๋๋ก ๊ตฌํํ์ ๊ฒ๊ฐ์๋ฐ
์ฐ์ํํ
ํฌ์ฝ์ค 3์ฃผ์ฐจ ๊ณตํต ํผ๋๋ฐฑ์ ๋ณด์๋ฉด,
> ํจ์(๋ฉ์๋) ๋ผ์ธ์ ๋ํ ๊ธฐ์ค ํ๋ก๊ทธ๋๋ฐ ์๊ตฌ์ฌํญ์ ๋ณด๋ฉด ํจ์ 15๋ผ์ธ์ผ๋ก ์ ํํ๋ ์๊ตฌ์ฌํญ์ด ์๋ค. ์ด ๊ธฐ์ค์ main() ํจ์์๋ ํด๋น๋๋ค. ๊ณต๋ฐฑ ๋ผ์ธ๋ ํ ๋ผ์ธ์ ํด๋นํ๋ค. 15๋ผ์ธ์ด ๋์ด๊ฐ๋ค๋ฉด ํจ์ ๋ถ๋ฆฌ๋ฅผ ์ํ ๊ณ ๋ฏผ์ ํ๋ค.
๋ผ๊ณ ์ ์๋์ด์์ด์. ๋ง์ฝ ์ดํ controller์ service, repository๊น์ง ๋ง์์ง๊ฒ ๋๋ ํ๋ก๊ทธ๋จ์ด๋ผ๋ฉด ์ ์๊ตฌ์ฌํญ์ ์ด๊ธฐ๊ฒ ๋ ๊ฒ๊ฐ์๋ฐ ์ด... |
@@ -0,0 +1,34 @@
+package lotto.model;
+
+import static lotto.constant.Constant.THOUSAND;
+import static lotto.constant.Constant.ZERO;
+import static lotto.exception.ErrorInputException.ErrorMessage.PURCHASE_PRICE_CAN_DIVIDE_BY_THOUSAND;
+
+import lotto.exception.ErrorInputException;
+
+public class PurchasePrice {
+ ... | Java | calculateLottoCount๋ฅผ ํธ์ถํ ๋๋ง๋ค ๊ตฌ์
๊ฐ๊ฒฉ์์ 1000์ ๋๋ํ
๋ฐ ์ด๋ ๊ฒ ํ์ ์ด์ ๊ฐ ๊ถ๊ธํฉ๋๋ค!! |
@@ -0,0 +1,57 @@
+package lotto.model;
+
+import static lotto.constant.Constant.ZERO;
+
+import java.util.Collections;
+import java.util.EnumMap;
+import java.util.List;
+import java.util.Map;
+import lotto.constant.Rank;
+
+public class Statistics {
+ private final Map<Rank, Integer> result;
+
+ private Statisti... | Java | int๋ก ์ ์ธํ์
๋ ๋์ํ
๋ฐ long์ผ๋ก ์ ์ธํ์ ์ด์ ๊ฐ ๊ถ๊ธํฉ๋๋ค! |
@@ -0,0 +1,40 @@
+package lotto.dto;
+
+import lotto.model.BonusNumber;
+import lotto.model.LottoNumbers;
+import lotto.model.PurchasePrice;
+import lotto.model.Statistics;
+import lotto.model.WinnerNumber;
+
+public class BuyLottoDto {
+ private PurchasePrice purchasePrice;
+ private LottoNumbers lottoNumbers;
+... | Java | ํ์ฌ calculateMatching๋ฉ์๋๋ statics๋๋ฉ์ธ์ ์ ๊ทผํ๊ธฐ ์ํ ๋ฉ์๋๋ก ๋ณด์ฌ์ง๋๋ค! service๊ณ์ธต์ด ์๋ ์ด์ ๋, ํ๋ ์ ํ
์ด์
๊ณ์ธต๊ณผ ๋ฐ์ดํฐ ์์ธ์ค ๊ณ์ธต ์ฌ์ด๋ฅผ ์ฐ๊ฒฐํ๊ธฐ ์ํจ์ด์ฃ !! ๋ฐ๋ผ์ ์ด ๋ถ๋ถ์ service์ชฝ์์ ๊ตฌํ๋์ด์ผํ๋ค๊ณ ์๊ฐํด์! |
@@ -0,0 +1,57 @@
+package lotto.model;
+
+import static lotto.constant.Constant.ZERO;
+
+import java.util.Collections;
+import java.util.EnumMap;
+import java.util.List;
+import java.util.Map;
+import lotto.constant.Rank;
+
+public class Statistics {
+ private final Map<Rank, Integer> result;
+
+ private Statisti... | Java | ์ฌํ๋ ๋๋ถ์ EnumMap์ ๋ํด์ ์ฒ์์ผ๋ก ๋ฐฐ์ ๋ค์!! ใ
ใ
EnumMap์ด ํด์์ถฉ๋์ ์์ผ์ผํจ๋ค๋๋ฐ ๋๋ถ์ ๋ฐฐ์๊ฐ๋๋ค!! |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.