Skip to content

Commit

Permalink
fix: 아직 리뷰를 남기지 않은 리뷰어가 있는 경우 승인 완료 안내 오류 해결 #424
Browse files Browse the repository at this point in the history
  • Loading branch information
useon committed Dec 5, 2024
1 parent 2c49d79 commit 2ce65fe
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/fe-review-reminder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,13 @@ jobs:
const reviewStatusMessage = [...reviewStatuses, ...notStartedMentions];
// 모든 리뷰어가 APPROVED인 경우
if (Array.from(reviewStates.values()).every(state => state === 'APPROVED')) {
const allReviewersApproved = requestedReviewers.every(
reviewer => reviewStates.get(reviewer) === 'APPROVED'
);
const noPendingReviews = notStartedReviewers.length === 0;
// 모든 리뷰어가 APPROVED 상태이고 리뷰를 시작하지 않은 리뷰어가 없는 경우
if (allReviewersApproved && noPendingReviews) {
const authorMention = discordMentions[pr.user.login] || `${pr.user.login}`;
return `[[${pr.dLabelName}] ${pr.title}](<${pr.html_url}>)\n리뷰어: ${reviewStatusMessage.join(', ')}\n<@${authorMention}>, 모든 리뷰어의 승인 완료! 코멘트를 확인 후 머지해 주세요 🚀`;
}
Expand Down

0 comments on commit 2ce65fe

Please sign in to comment.