Skip to content

Commit 572c0ab

Browse files
bumkeyydvlprsh
andauthored
CONTRIBUTING.md에 Pull Request 방법 추가 (#126)
* Contributing.md에 Pull Request 방법 추가 * remove new line * fix rebase * fix lint error * fix lint error Co-authored-by: dvlprsh <[email protected]>
1 parent 4b31aba commit 572c0ab

File tree

3 files changed

+101
-3
lines changed

3 files changed

+101
-3
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,4 +227,6 @@ $RECYCLE.BIN/
227227
# Windows shortcuts
228228
*.lnk
229229

230-
# End of https://www.gitignore.io/api/node,macos,windows,intellij,sublimetext,visualstudiocode
230+
# End of https://www.gitignore.io/api/node,macos,windows,intellij,sublimetext,visualstudiocode
231+
232+
.vscode

CONTRIBUTING.md

Lines changed: 97 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,103 @@ interface NumberDictionary {
121121
* [describe - 번역 팁](http://blog.daum.net/standards/442)
122122

123123

124-
## Pull Request
124+
# Pull Request
125125

126126
* PR 전에 맞춤법 검사를 수행해 주세요.
127127
* PR은 최소 두 명의 메인테이너가 찬성하면 머지할 수 있습니다.
128+
129+
## Working With Code
130+
131+
PR을 보내는 프로세스는 매우 간단하며, 일반적으로 매번 동일한 패턴을 따릅니다.
132+
133+
1. [새 브랜치 만들기](#step-1-새-브랜치-만들기)
134+
2. [수정하기](#step-2-수정하기)
135+
3. [Upstream으로부터 rebase하기](#step-3-upstream으로-부터-rebase하기)
136+
4. [테스트하기](#step-4-테스트하기)
137+
5. [변경 내용을 push하기](#step-5-변경-내용을-push-하기)
138+
6. [Pull Request 보내기](#step-6-pull-request-보내기)
139+
140+
각 단계에 대한 자세한 내용은 아래에 있습니다.
141+
142+
### Step 1: 새 브랜치 만들기
143+
144+
PR을 보내기 위해 fork한 레포지토리에서 브랜치를 만듭니다. 브랜치 이름은 수정하려는 내용을 간단하게 표현합니다.
145+
146+
```sh
147+
$ git checkout -b issue1234
148+
```
149+
150+
이 브랜치에서는 해당 이슈에 관련된 수정을 해야합니다.
151+
152+
**Note**: 여러 이슈에 대한 수정을 하나의 브랜치에서 수행하면 안됩니다. 이슈마다 각 브랜치를 생성하세요.
153+
154+
### Step 2: 수정하기
155+
156+
[번역 규칙](#번역-규칙)에 따라 문서를 번역 및 수정합니다. 번역이 완료되면 브랜치에 수정을 커밋합니다.
157+
158+
```sh
159+
$ git add -A
160+
$ git commit
161+
```
162+
163+
커밋 메시지는 커밋의 내용을 요약해서 입력합니다.
164+
165+
### Step 3: Upstream으로 부터 rebase하기
166+
167+
Pull Request를 보내기 전에 upstream 소스를 rebase해야 합니다. 이렇게 하면 최신 코드를 가져와 충돌을 피할 수 있습니다.
168+
169+
먼저 remote 저장소를 확인합니다.
170+
171+
```sh
172+
$ git remote -v
173+
origin https://github.com/myusername/typescript-kr.github.io.git (fetch)
174+
origin https://github.com/myusername/typescript-kr.github.io.git (push)
175+
upstream # 이 라인은 나타나지 않을 수도 있다
176+
```
177+
178+
upstream이 설정되어 있지 않다면 upstream을 설정합니다.
179+
180+
```sh
181+
$ git remote add upstream https://github.com/typescript-kr/typescript-kr.github.io.git
182+
```
183+
184+
그 다음 upstream 소스를 rebase 합니다.
185+
186+
```sh
187+
$ git fetch upstream
188+
$ git rebase upstream/master
189+
```
190+
191+
### Step 4: 테스트하기
192+
193+
현재 모든 문서에는 markdown lint가 적용되어 있습니다. 리베이스 이후에 테스트를 하여 린트 규칙을 확인합니다.
194+
195+
```sh
196+
$ npm test
197+
```
198+
199+
또한 local 환경에서 gitbook을 테스트할 수 있습니다.
200+
201+
```sh
202+
$ npm run serve:gitbook
203+
```
204+
205+
http://localhost:4000 에서 번경된 문서를 확인할 수 있습니다.
206+
207+
### Step 5: 변경 내용을 Push 하기
208+
209+
변경 내용을 clone한 레포지토리에 push합니다.
210+
211+
```sh
212+
$ git push origin issue1234
213+
```
214+
215+
일부 참조가 오래되어 push할 수 없다면 [rebase](#step-3-upstream으로-부터-rebase하기)를 통해 최신 코드를 가져온 후 다시 push 합니다.
216+
217+
```sh
218+
$ git push -f origin issue1234
219+
```
220+
221+
### Step 6: Pull Request 보내기
222+
223+
이제 Pull Request를 보낼 준비가 완료되었습니다. Fork된 레포지토리로 이동하여 [Github 문서](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request)를 참고하여 Pull Request를 보냅니다.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
## 진행 상황
1212

13-
번역 진행 상황은 [이곳](https://github.com/typescript-kr/typescript-kr.github.io/projects/1)을 통해 확인할 수 있습니다.
13+
번역 진행 상황은 [이곳](https://github.com/typescript-kr/typescript-kr.github.io/projects)을 통해 확인할 수 있습니다.
1414

1515
## 참여하기
1616

0 commit comments

Comments
 (0)