Skip to content

Commit

Permalink
Update 릴리즈노트_생성을_자동화하기.md
Browse files Browse the repository at this point in the history
  • Loading branch information
genie-youn authored Nov 23, 2021
1 parent 9b10511 commit 8a5cf9b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions 개발환경/릴리즈노트_생성을_자동화하기.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@ config 옵션으로 받은 enterprise github api endpoint가 있다면 `Configur

<img width="808" alt="스크린샷 2021-11-22 오후 10 54 59" src="https://user-images.githubusercontent.com/16642635/142873808-46ad3867-7ae7-49eb-9426-f5c31e417b91.png">

`Configuration` 에선 `package.json` 이나 `lerna.json``gitHostingServerURL` 옵션이 존재하는지 확인한다.

이 정보를 `GitHostingAPIFactory` 에게 전달하면 `gitHostingServerURL` 가 있다면 `GithubEnterpriseAPI`의 인스턴스를, 아니라면 `GithubAPI` 인스턴스를 반환한다.

생성한 `GitHostingAPI` 인스턴스는 `Configuration``gitHostingAPI` 프로퍼티에 담아 `Changelog`에 전달되게 된다.

기존의 각 객체들이 자신의 책임에 맞도록 응집력있게 구현되어 있어 수정하기가 수월했다.

또 한가지 인상깊었던건 Typescript 였다. 스터디만 해봤을뿐 실제로 코드를 작성해본적이 없었는데도 불구하고 생각보다 쉽게 써내려져갔다.

뿐만 아니라 코드를 읽는데도 많은 도움이 되었다. 생각보다 코드를 파악하는데 많은 영향을 주더라. 컴파일타임에 타입체크가 되니 생각치못한 사이드이펙트도 빠르게 확인할 수 있고..

Typescript와 든든한 테스트코드들이 있어 자신있게 코드를 수정할 수 있었다. 좋은 경험이었다.

수정한 코드는 https://github.com/genie-youn/lerna-changelog 에서 확인할 수 있다.

lerna-changelog의 저장소로도 PR은 올려둔 상태이나, 받아들여질지는 조금 지켜봐야할 것 같다. 하자는 없는것 같은데..


#### 분석
bin/cli.js 로 제공됨.
Expand Down

0 comments on commit 8a5cf9b

Please sign in to comment.