Conversation
WalkthroughThe GitHub Actions workflow configuration was updated to remove the scheduled trigger that previously ran the workflow on weekdays at a specific time. Additionally, a newline was appended to the end of the file, but this does not impact the workflow's behavior. Changes
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
.github/workflows/pr_notification.yml (1)
97-104: Multi-line Bash string is brittle – switch to a heredoc for safer quotingThe multi-line
MESSAGE="..."assignment relies on embedded new-lines and double quotes.
Any unescaped$,\, or"inside the PR title (or other interpolated values) will break the assignment and potentially the whole step.Refactor to a heredoc so that the payload is unaffected by user-supplied content:
- if [ "$prAction" == "opened" ]; then - MESSAGE="**📢 새로운 PR이 도착했습니다!** - - <@${prReviewerDiscordID}> 님 리뷰어로 할당되었습니다!! 🙏 - - PR 제목 : ${prTitle} - - 등록한 사람 : ${prUser} - - 리뷰어 : <@${prReviewerDiscordID}> - - 리뷰하러 가기 >> [Click](${prUrl})" + if [ "$prAction" == "opened" ]; then + read -r -d '' MESSAGE <<'EOF' +**📢 새로운 PR이 도착했습니다!** +- <@${prReviewerDiscordID}> 님 리뷰어로 할당되었습니다!! 🙏 +- PR 제목 : ${prTitle} +- 등록한 사람 : ${prUser} +- 리뷰어 : <@${prReviewerDiscordID}> +- 리뷰하러 가기 >> [Click](${prUrl}) +EOF(The same pattern should be applied to the other branches.)
This avoids accidental variable expansion and quoting pitfalls.
🧹 Nitpick comments (2)
.github/workflows/pr_notification.yml (2)
129-138: Expose response body when the webhook call failsWhen the Discord webhook returns a non-204 status the current script only prints the status code, which makes debugging difficult.
Capture and output the response body as well:- RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -X POST -H 'Content-Type: application/json' -d "$DATA" "$DISCORD_WEBHOOK_URL") + RESPONSE=$(curl -s -w "\n%{http_code}" -H 'Content-Type: application/json' -d "$DATA" "$DISCORD_WEBHOOK_URL") + HTTP_CODE=$(echo "$RESPONSE" | tail -n1) + BODY=$(echo "$RESPONSE" | head -n -1) - if [ "$RESPONSE" -ne 204 ]; then - echo "Failed to send Discord notification. HTTP Status Code: $RESPONSE" + if [ "$HTTP_CODE" -ne 204 ]; then + echo "Failed to send Discord notification. HTTP Status Code: $HTTP_CODE" + echo "Response body:" + echo "$BODY" exit 1 fiThis will save several round-trips when investigating webhook issues.
24-40: Fail early ifREVIEWER_MAPPINGsecret is missing
mappingJson = process.env.REVIEWER_MAPPINGwill beundefinedwhen the secret isn’t configured, causingJSON.parse(undefined)to throw a confusing “Cannot convert undefined or null to object” rather than an explicit message.- const mappingJson = process.env.REVIEWER_MAPPING; + const mappingJson = process.env.REVIEWER_MAPPING; + if (!mappingJson) { + throw new Error('REVIEWER_MAPPING secret is not defined.'); + }This makes mis-configuration obvious.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/pr_notification.yml(1 hunks)
🔇 Additional comments (1)
.github/workflows/pr_notification.yml (1)
140-140: 👍 Adding the terminating newline is POSIX-friendlyShell scripts conventionally end with a trailing newline so tools don’t misinterpret the last line. Good catch.
작업 요약
pr 알림 테스트
Issue Link
문제점 및 어려움
해결 방안
Reference
Summary by CodeRabbit