Skip to content

Discord PR 알림을 Slack으로 교체#133

Merged
chanho0908 merged 3 commits intodevelopfrom
feat/#132-pr-slack-notify-ci
Mar 23, 2026
Merged

Discord PR 알림을 Slack으로 교체#133
chanho0908 merged 3 commits intodevelopfrom
feat/#132-pr-slack-notify-ci

Conversation

@chanho0908
Copy link
Member

@chanho0908 chanho0908 commented Mar 23, 2026

이슈 번호

close #132

작업내용

  • 메신저 변경(Discord → Slack)에 따라 PR 알림 워크플로우를 교체
  • .github/workflows/slack-pr-notify.yml 추가

결과물

@chanho0908 chanho0908 self-assigned this Mar 23, 2026
@chanho0908 chanho0908 added the Feature Extra attention is needed label Mar 23, 2026
@chanho0908 chanho0908 linked an issue Mar 23, 2026 that may be closed by this pull request
1 task
@chanho0908 chanho0908 requested a review from dogmania March 23, 2026 03:21
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between a8ecc22 and bae5fc0.

📒 Files selected for processing (1)
  • .github/workflows/slack-pr-notify-ci

coderabbitai[bot]

This comment was marked as resolved.

@YAPP-Github YAPP-Github deleted a comment from coderabbitai bot Mar 23, 2026
@YAPP-Github YAPP-Github deleted a comment from coderabbitai bot Mar 23, 2026
@chanho0908 chanho0908 merged commit 05ce7d7 into develop Mar 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PR Slack 알림 CI 추가

1 participant