Skip to content

Commit 63b6d8f

Browse files
authored
Merge pull request #13 from Leets-Official/12-feat/공통-컴포넌트-리팩토링
[Feat] 공통 컴포넌트 리팩토링 및 라우팅 설정
2 parents 98f54d8 + e08b7bf commit 63b6d8f

53 files changed

Lines changed: 1533 additions & 187 deletions

Some content is hidden

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

.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# 모든 텍스트 파일 LF 통일
2+
* text=auto eol=lf
3+
4+
# YAML 파일 명시적으로 LF사용
5+
*.yml text eol=lf
6+
*.yaml text eol=lf
7+
8+
# Windows 배치 파일 CRLF
9+
*.bat text eol=crlf

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
- [ ] PR 본문에 `Close #번호` 추가
1616
- [ ] 불필요한 주석, 디버깅 코드 제거
1717
- [ ] 기능 테스트 및 정상 동작 확인
18-
- [ ] 커밋컨벤션 준수
18+
- [ ] 커밋컨벤션 / 코드컨벤션 준수
1919

2020
---
2121

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: PR Automation
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
issues: write
11+
12+
jobs:
13+
auto-setup:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Auto assign and add reviewers
17+
uses: actions/github-script@v7
18+
with:
19+
script: |
20+
const prNumber = context.payload.pull_request.number;
21+
const prAuthor = context.payload.pull_request.user.login;
22+
const branchName = context.payload.pull_request.head.ref;
23+
const currentAssignees = context.payload.pull_request.assignees || [];
24+
const currentReviewers = context.payload.pull_request.requested_reviewers || [];
25+
26+
// Assignee 설정
27+
if (currentAssignees.length === 0) {
28+
await github.rest.issues.addAssignees({
29+
owner: context.repo.owner,
30+
repo: context.repo.repo,
31+
issue_number: prNumber,
32+
assignees: [prAuthor]
33+
});
34+
}
35+
36+
// Reviewer 추가
37+
if (currentReviewers.length === 0) {
38+
const reviewers = ['YeBeenChoi', 'jwj0620gcu'].filter(r => r !== prAuthor);
39+
if (reviewers.length > 0) {
40+
try {
41+
await github.rest.pulls.requestReviewers({
42+
owner: context.repo.owner,
43+
repo: context.repo.repo,
44+
pull_number: prNumber,
45+
reviewers: reviewers
46+
});
47+
} catch (error) {
48+
console.log('Failed to add reviewers:', error.message);
49+
}
50+
}
51+
}
52+
53+
// 브랜치명에서 라벨 추출 및 추가
54+
const labelMatch = branchName.match(/(?:^\d+-)?(\w+)\//);
55+
if (labelMatch) {
56+
const labelMap = {
57+
'feat': '✨Feature',
58+
'fix': '🐛BugFix',
59+
'hotfix': '🚨Hotfix',
60+
'refactor': '♻️Refactor',
61+
'test': '✅Test',
62+
'docs': '📝Docs',
63+
'chore': '🛠️ Chore'
64+
};
65+
const labelToAdd = labelMap[labelMatch[1].toLowerCase()];
66+
67+
if (labelToAdd) {
68+
try {
69+
await github.rest.issues.addLabels({
70+
owner: context.repo.owner,
71+
repo: context.repo.repo,
72+
issue_number: prNumber,
73+
labels: [labelToAdd]
74+
});
75+
} catch (error) {
76+
console.log('Failed to add label:', error.message);
77+
}
78+
}
79+
}

.github/workflows/pr-check.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@ jobs:
6969

7070
- name: Build app
7171
id: build
72-
run: yarn vite build --mode development
73-
env:
74-
DISABLE_ESLINT_PLUGIN: true
75-
GENERATE_SOURCEMAP: false
72+
run: yarn build
7673

7774
- name: Build size check
7875
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ node_modules
1111
dist
1212
dist-ssr
1313
*.local
14+
.react-router
1415

1516
# Editor directories and files
1617
.vscode/*

eslint.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@ export default [
151151
],
152152
'react-hooks/rules-of-hooks': 'error',
153153
'react-hooks/exhaustive-deps': 'error',
154-
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
154+
'react-refresh/only-export-components': [
155+
'warn',
156+
{ allowConstantExport: true, allowExportNames: ['links', 'meta', 'loader', 'action'] },
157+
],
155158
'jsx-a11y/alt-text': 'error',
156159
'jsx-a11y/anchor-has-content': 'error',
157160
'jsx-a11y/anchor-is-valid': 'warn',

index.html

Lines changed: 0 additions & 13 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"react": "^19.2.3",
3232
"react-dom": "^19.2.3",
3333
"react-hook-form": "^7.68.0",
34-
"react-router": "7",
34+
"react-router": "7.12.0",
3535
"tailwind-merge": "^3.4.0",
3636
"tailwind-variants": "^3.2.2",
3737
"zod": "^4.2.1",
@@ -40,6 +40,8 @@
4040
"devDependencies": {
4141
"@chromatic-com/storybook": "^4.1.3",
4242
"@eslint/js": "^9.39.1",
43+
"@react-router/dev": "^7.12.0",
44+
"@react-router/node": "^7.12.0",
4345
"@storybook/addon-a11y": "^10.1.10",
4446
"@storybook/addon-docs": "^10.1.10",
4547
"@storybook/addon-onboarding": "^10.1.10",

public/apple-touch-icon.png

3.26 KB
Loading

public/favicon-96x96.png

2.33 KB
Loading

0 commit comments

Comments
 (0)