feat: 관리자 검수 결과에 따라 이모지를 남기도록 - #838
Conversation
|
Warning Review limit reachedNext included review available in 53 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (20)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0ade22209
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (webhookUrl.isBlank() || "local".equalsIgnoreCase(environment)) { | ||
| return; | ||
| } | ||
| DiscordMessageResponse response = discordWebhookSender.sendAndGetMessage( |
There was a problem hiding this comment.
Isolate webhook delivery from submission transactions
When the configured Discord webhook times out or returns a non-2xx response, sendAndGetMessage propagates the RestClientException; this new overload is also not @Async, unlike the previous notification path. Because ScoreService.submitGpaScore, submitLanguageTestScore, and MentorApplicationService.submitMentorApplication invoke it inside their transactions, a Discord outage now rejects and rolls back user submissions instead of merely losing the optional notification. Catch and isolate delivery failures or move this work to an asynchronous post-commit flow.
Useful? React with 👍 / 👎.
| String url = REACTION_URL.formatted(channelId, messageId, encodedEmoji); | ||
| HttpHeaders headers = new HttpHeaders(); | ||
| headers.set("Authorization", "Bot " + botToken); | ||
| discordBotRestTemplate.exchange(url, HttpMethod.PUT, new HttpEntity<>(headers), Void.class); |
There was a problem hiding this comment.
Prevent reaction failures from rejecting review decisions
When a notification mapping exists and Discord returns 401/429/5xx or times out, this synchronous exchange throws into each transactional admin approval/rejection method. The resulting exception rolls back the GPA, language-test, or mentor review and returns an error solely because the cosmetic reaction could not be added; this is especially disruptive for a missing or rotated bot token. Isolate this client failure and preferably dispatch the reaction after the review transaction commits.
Useful? React with 👍 / 👎.
| case APPROVED -> DiscordReactionEmoji.APPROVED.getValue(); | ||
| case REJECTED -> DiscordReactionEmoji.REJECTED.getValue(); | ||
| case PENDING -> null; |
There was a problem hiding this comment.
Replace stale reactions when a score verdict changes
The score update APIs accept any VerifyStatus even for an already reviewed score, but this switch only adds the new verdict and does nothing for PENDING. Consequently, changing APPROVED to REJECTED leaves both ✅ and ❌ on the message, while resetting either verdict to PENDING leaves the old reaction visible. Remove the prior bot reaction, or otherwise synchronize reactions to the current status, before publishing the new result; the same issue exists in the language-test path.
Useful? React with 👍 / 👎.
관련 이슈
작업 내용
특이 사항
리뷰 요구사항 (선택)