Merged
Conversation
Closed
1 task
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/slack-pr-notify-ci:
- Around line 29-31: The Slack mention currently sets
SLACK_MENTION="@$REQUESTED_REVIEWER", which doesn't produce a real Slack user
mention; replace that behavior by resolving GitHub login (REQUESTED_REVIEWER) to
a Slack user ID and set SLACK_MENTION to the Slack format (<@SLACK_ID>); if
resolution fails, either (A) fail loudly (exit non‑zero with a clear error) or
(B) emit an explicit error log/CI warning and fall back to plain text, depending
on the chosen policy—implement the resolver lookup and error handling where
SLACK_MENTION is assigned so unmapped users are detected and handled
consistently.
- Line 1: Rename the workflow file to include a .yml extension so GitHub Actions
recognizes it (change filename to slack-pr-notify-ci.yml); update the Slack
mention logic that currently uses @$REQUESTED_REVIEWER to use Slack user IDs in
the form <@USER_ID> or expand your mapping to translate usernames to IDs (refer
to the REQUESTED_REVIEWER variable); protect JSON payloads that interpolate
"$PR_TITLE" by constructing the payload with a JSON builder (e.g., jq -n or
equivalent) or otherwise JSON-encoding the PR_TITLE to avoid breaking on
quotes/newlines; and make the Slack API calls robust by using curl with failure
detection (e.g., --fail --fail-with-body) and add basic retry/error-handling
around the curl invocation to surface and recover from 4xx/5xx or network errors
(refer to the curl commands used for posting to Slack).
- Around line 34-37: The current curl invocation manually composes JSON and can
break if PR_TITLE contains quotes/newlines and also won't fail CI on HTTP
errors; replace the manual -d string with a safe JSON generator using jq -n
--arg SLACK_MENTION "$SLACK_MENTION" --arg PR_NUMBER "$PR_NUMBER" --arg PR_TITLE
"$PR_TITLE" --arg PR_URL "$PR_URL" '{text: ($SLACK_MENTION + " 리뷰 요청이 왔어요! 👀"),
attachments: [{title: ("#" + $PR_NUMBER + " " + $PR_TITLE), title_link: $PR_URL,
color: "#58B9FF"}]}' | curl --fail-with-body --max-time 10 --retry 3
--retry-delay 2 -H "Content-Type: application/json" -X POST -d `@-`
"$SLACK_WEBHOOK"; ensure you check curl's exit code and exit 1 on failure so CI
detects the notification failure.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: e4d99c71-6ea8-4668-b79c-97ef56504422
📒 Files selected for processing (1)
.github/workflows/slack-pr-notify-ci
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
이슈 번호
close #132
작업내용
결과물