-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] Notification 관련 CI workflow 에러 해결 #144
Merged
Merged
Conversation
This file contains 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
rlajm1203
approved these changes
Aug 23, 2024
Comment on lines
+31
to
+59
|
||
get_slack_id() { | ||
local github_username="$1" | ||
echo "$SLACK_IDS_JSON" | jq -r --arg user "$github_username" '.[$user] // empty' | ||
} | ||
|
||
author_slack_id=$(get_slack_id "$PR_AUTHOR") | ||
reviewer_slack_id=$(get_slack_id "$REVIEWER") | ||
|
||
if [ -n "$author_slack_id" ]; then | ||
author_mention="<@$author_slack_id>" | ||
else | ||
author_mention="$PR_AUTHOR" | ||
echo "Warning: No Slack ID found for PR author $PR_AUTHOR" >&2 | ||
fi | ||
|
||
if [ -n "$reviewer_slack_id" ]; then | ||
reviewer_mention="<@$reviewer_slack_id>" | ||
else | ||
reviewer_mention="$REVIEWER" | ||
echo "Warning: No Slack ID found for reviewer $REVIEWER" >&2 | ||
fi | ||
|
||
case "$REVIEW_STATE" in | ||
"changes_requested") | ||
message="$author_mention님, $reviewer_mention님이 PR에 변경을 요청했습니다: <$PR_URL|$PR_TITLE>" | ||
;; | ||
"commented") | ||
message="$author_mention님, $reviewer_mention님이 PR에 댓글을 달았습니다: <$PR_URL|$PR_TITLE>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
엄청난 양의 shell Script...대단해요!
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.
📌 관련 이슈
closed #142
✒️ 작업 내용
PR 발생 시 알람 CI
리뷰 발생 시 알람 CI
리뷰가 발생했을 때 CI도 추가해두었습니다.
스크린샷 🏞️ (선택)
💬 REVIEWER에게 요구사항 💬
현재 backend-ci가 통과하지 않을 것입니다(이는 #143 이슈에서 해결합니다.)
따라서 notification 관련 CI만 해당 PR에서 통과하면 merge 해도 될 것 같습니다!