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 22, 2021
1 parent 48f44ce commit 9b10511
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion 개발환경/릴리즈노트_생성을_자동화하기.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,19 @@ config 옵션으로 받은 enterprise github api endpoint가 있다면 `Configur

<img width="962" alt="스크린샷 2021-11-21 오후 9 26 28" src="https://user-images.githubusercontent.com/16642635/142761731-b5e5968b-a6ce-4aab-a8aa-f65c1e9eed4b.png">

이름..이름을 뭘로할까..
우선 `git-hosting-api` 라는 패키지를 만들고, 기존의 `GithubAPI`의 인터페이스를 `GitHostingAPI`로 추상화시켰다. 기존의 `GithubIssueResponse``GithubUserResponse` 도 각각 `GitHostingIssueResponse``GitHostingUserResponse`로 이름을 변경하였다. (API 응답의 인터페이스를 그대로 노출하는게 마음에 안들긴하지만)

기존 `GithubAPI``GitHostingAPI`를 구현하게 하고 동일한 동작을 생성시 option으로 주입받은 APIEndpoint를 fetch하는 `GithubEnterpriseAPI` 를 추가하였다.

또한 외부에서 구체클래스를 몰라도 적절한 객체를 생성할 수 있도록 `GitHostingAPIFactory`를 추가하였다.

만약 bitbucket등 다른 호스팅 서비스를 지원하게 된다면 `GitHostingAPI` 를 구현한 `BitbucketAPI` 를 추가하고 `GitHostingAPIFactory`가 이를 반환하게 하면 될 것이다.

대략적인 모습은 다음과 같다.


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


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

0 comments on commit 9b10511

Please sign in to comment.