-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(vscode): Add private method 'ensureOctokitInstance' to resolve Octokit's common logic. #562
Conversation
…ctokit's common logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
중복코드 개선 넘 좋은 것 같습니다! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
코드 개선 넘 좋습니다👍👍👍
compile 에러 한번 확인해주시고, (type 에러 같습니당) |
@ytaek 재확인 부탁드립니다~! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 입니다!!
Related issue
#561
Result
Octokit 인스턴스가 이미 있으면 바로 가져오고, 없다면 새로 만들어서 가져오는 로직이 중복되고 있었습니다.
그래서 그 부분을 private method로 따로 만들었습니다.
이 메서드가 호출되면, Octokit이 존재함이 보장됩니다.
Work list
Discussion
더 좋은 방법 있다면 말씀 부탁드립니다~