-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Discord Webhook URL 동적 로딩 기능 구현 완료 #20
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
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
7a04f36
refactor: 전략 패턴과 심플 팩토리 패턴 적용
move-hoon 8a77ed0
refactor: 범용 네이밍으로 예외 클래스 이름 변경
move-hoon 7166181
feat: Discord 관련 오류메시지 추가
move-hoon 6bcc847
feat: Discord 메시지 관련 VO 구현
move-hoon 26acfb7
feat: DiscordNotificationService 전용 상수 클래스 추가
move-hoon a15072c
feat: Discord 알림 전송 기능 구현
move-hoon 7f6e1df
chore: 의도에 맞게 매개변수 이름 변경
move-hoon 551a82c
chore: 테스트 관련 의존성 추가
move-hoon 1ef783f
feat: 테스트 환경 전용 환경 변수를 관리하는 클래스 구현
move-hoon 7ad2889
feat: eventNode에서 이벤트를 추출하는 서비스 클래스 구현
move-hoon c59e644
feat: 알림 처리 로직을 담당하는 서비스 클래스 구현
move-hoon bd62d66
refactor: 외부에서 생성자로 objectMapper를 주입하도록 변경
move-hoon 5d7da33
refactor: SentryWebhookHandler에서 이벤트 추출 및 알림 처리 로직 분리
move-hoon 73a6220
refactor: ObjectMapper를 인자로 받아 NotificationService를 생성하도록 구조 변경
move-hoon c4b0d4b
delete: FakeEnvUtil 클래스 삭제
move-hoon 0041749
refactor: env 파일 경로를 setter로 주입할 수 있도록 변경
move-hoon bf9be0a
test: SentryEventExtractorService에 실제 Sentry 웹훅 데이터 기반 단위 테스트 추가
move-hoon e908b00
delete: 사용하지 않는 dotenv 유틸 클래스 삭제
move-hoon 4d80d3b
chore: assertJ와 wireMock 의존성 추가
move-hoon 4cf8745
chore: 실제로 존재하는 이미지 URL로 변경
move-hoon c486183
chore: 사용하지 않는 import문 정리 및 discord username 변경
move-hoon 63d87c9
fix: NotFoundException 상태코드에 맞게 수정
move-hoon 5456922
chore: DisplayName 변경
move-hoon 246dd0b
test: SentryWebhookHandler 테스트 케이스 작성
move-hoon 81c3e34
test: 불필요한 import문 제거
move-hoon f917b39
refactor: 슬랙/디스코드 공통 예외로 변경
move-hoon 4b536e2
fix: 한 번에 하나의 스레드만 접근 가능하도록 하여 동시 초기화 방지
move-hoon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/org/sopt/makers/global/constant/DiscordConstant.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package org.sopt.makers.global.constant; | ||
|
|
||
| import lombok.AccessLevel; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
| public final class DiscordConstant { | ||
| // 컨텐츠 타입 | ||
| public static final String CONTENT_TYPE_JSON = "application/json"; | ||
|
|
||
| // 날짜 형식 | ||
| public static final String DATE_FORMAT_PATTERN = "yyyy-MM-dd HH:mm:ss"; | ||
| public static final String TIMEZONE_SEOUL = "Asia/Seoul"; | ||
|
|
||
| // 메시지 형식 | ||
| public static final String EMOJI_PREFIX = "🚨"; | ||
| public static final String TRUNCATION_SUFFIX = "..."; | ||
|
|
||
| // Discord 리소스 | ||
| public static final String SENTRY_ICON_URL = "https://raw.githubusercontent.com/getsentry/sentry/master/src/sentry/static/sentry/images/sentry-glyph-black.png"; | ||
|
|
||
| // Discord 임베드 제한 | ||
| public static final int MAX_TITLE_LENGTH = 256; | ||
| public static final int MAX_DESCRIPTION_LENGTH = 4096; | ||
| } |
13 changes: 13 additions & 0 deletions
13
src/main/java/org/sopt/makers/global/exception/checked/MessageBuildException.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package org.sopt.makers.global.exception.checked; | ||
|
|
||
| import org.sopt.makers.global.exception.base.BaseErrorCode; | ||
|
|
||
| public class MessageBuildException extends SentryCheckedException { | ||
| public MessageBuildException(BaseErrorCode errorCode) { | ||
| super(errorCode); | ||
| } | ||
|
|
||
| public static MessageBuildException from(BaseErrorCode errorCode) { | ||
| return new MessageBuildException(errorCode); | ||
| } | ||
| } |
13 changes: 13 additions & 0 deletions
13
src/main/java/org/sopt/makers/global/exception/checked/SendException.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package org.sopt.makers.global.exception.checked; | ||
|
|
||
| import org.sopt.makers.global.exception.base.BaseErrorCode; | ||
|
|
||
| public class SendException extends SentryCheckedException { | ||
| public SendException(BaseErrorCode errorCode) { | ||
| super(errorCode); | ||
| } | ||
|
|
||
| public static SendException from(BaseErrorCode errorCode) { | ||
| return new SendException(errorCode); | ||
| } | ||
| } |
13 changes: 0 additions & 13 deletions
13
src/main/java/org/sopt/makers/global/exception/checked/SlackMessageBuildException.java
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
src/main/java/org/sopt/makers/global/exception/checked/SlackSendException.java
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/java/org/sopt/makers/global/exception/unchecked/InvalidPayloadException.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package org.sopt.makers.global.exception.unchecked; | ||
|
|
||
| import org.sopt.makers.global.exception.base.BaseErrorCode; | ||
|
|
||
| public class InvalidPayloadException extends SentryUncheckedException { | ||
| public InvalidPayloadException(BaseErrorCode errorCode) { | ||
| super(errorCode); | ||
| } | ||
|
|
||
| public static InvalidPayloadException from(BaseErrorCode errorCode) { | ||
| return new InvalidPayloadException(errorCode); | ||
| } | ||
| } |
13 changes: 0 additions & 13 deletions
13
src/main/java/org/sopt/makers/global/exception/unchecked/InvalidSlackPayloadException.java
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.