Skip to content

[CI] 디스코드 알림 본문 길이 제한 단일화 및 코드 정리 - #34

Merged
ehye1 merged 1 commit into
developfrom
ci/root/33-discord-notification-fix
Jun 26, 2026
Merged

[CI] 디스코드 알림 본문 길이 제한 단일화 및 코드 정리#34
ehye1 merged 1 commit into
developfrom
ci/root/33-discord-notification-fix

Conversation

@ehye1

@ehye1 ehye1 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

ISSUE 🔗

close #33



What is this PR? 🔍

discord-notification.yml에서 본문 처리 로직의 이중 제한 구조를 해소하고 불필요한 dead code를 제거했습니다.

배경

  • 기존 구조: clean_body 함수가 본문을 200자로 자른 뒤, DESC를 다시 400자로 제한하는 이중 제한 구조였습니다.
  • 발생 문제: PR 제목이 짧아도 body가 항상 200자로 잘려 DESC의 남은 공간을 활용하지 못했습니다. 또한 pull_request, pull_request_review 핸들러에서 DESC를 초기화한 뒤 즉시 덮어쓰는 dead code가 있었습니다.
  • 해결 방향: clean_body의 200자 제한을 제거하고 DESC 400자 단일 제한으로 통일했습니다.

clean_body — 400자 단일 제한으로 통일

  • 변경 요약: clean_body 함수의 cut -c1-200을 제거했습니다.
  • 이유: 이중 제한 구조에서는 제목이 짧아도 body가 항상 200자로 잘렸습니다. 제목이 20자면 DESC에 380자 여유가 있지만 body는 200자로 고정됐습니다.
  • 구현 방식: DESC는 **${PR_TITLE}**\n${CLEAN_BODY} 형태로 조합된 뒤 ${DESC:0:400}으로 잘립니다. 제목이 짧을수록 body가 더 많이 표시되고, 제목이 길면 body가 줄어드는 구조입니다. 4개 이벤트 케이스(pull_request, pull_request_review, pull_request_review_comment, issues) 모두 동일하게 적용됩니다.

Dead code 제거

  • 변경 요약: pull_request, pull_request_review 핸들러에서 불필요한 DESC 초기 할당 2곳을 제거했습니다.
  • 이유: 두 블록 모두 DESC를 raw body로 초기화한 뒤 CLEAN_BODY를 조합한 값으로 즉시 덮어쓰고 있어 실제로 참조되지 않는 불필요한 jq 호출이었습니다.



To Reviewers

${DESC:0:400} bash substring은 로케일에 따라 바이트 또는 문자 단위로 동작합니다. GitHub Actions ubuntu-latest는 기본적으로 C.UTF-8 로케일을 사용해 문자 단위로 잘리므로 한글이 중간에 끊기지 않습니다.



Screenshot 📷



Test Checklist ✔

  • PR/이슈 이벤트 트리거 후 디스코드 알림 본문 내용 확인

clean_body의 200자 제한 제거 후 DESC 400자 단일 제한으로 통일,
불필요한 DESC 초기 할당 dead code 제거, 주석 수정을 반영했습니다.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5e22e49b-df66-4b3f-8590-6cd553cb409c

📥 Commits

Reviewing files that changed from the base of the PR and between 3243fe0 and af45190.

📒 Files selected for processing (1)
  • .github/workflows/discord-notification.yml

Walkthrough

Discord 알림 워크플로우에서 본문 정리와 description 생성 방식이 바뀌었습니다. clean_body()는 공백 정규화만 수행하고, PR·review·comment·issue 분기 모두 title과 정리된 본문을 합친 뒤 최종 길이를 400자로 제한합니다.

Changes

Discord 알림 본문 구성

Layer / File(s) Summary
본문 정리
.github/workflows/discord-notification.yml
clean_body()가 보일러플레이트 제거 뒤 개행을 공백으로 바꾸고 연속 공백을 압축하도록 바뀌며, 빈 줄 제거와 200자 절단은 제거됐다.
description 조립 통일
.github/workflows/discord-notification.yml
pull_request, pull_request_review, pull_request_review_comment, issues 분기에서 DESC를 title과 CLEAN_BODY로 구성하고, 최종 description${DESC:0:400}으로 제한하도록 바뀌었다.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Team-Timo/Timo-client#11: 같은 워크플로우의 Discord embed description과 본문 정리 로직을 함께 다룹니다.
  • Team-Timo/Timo-client#29: .github/workflows/discord-notification.ymlclean_body()DESC/description 조립 방식이 직접적으로 겹칩니다.

Suggested reviewers

  • kimminna
  • jjangminii
  • yumin-kim2
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning 400자 제한은 반영됐지만 grep 파이프 오류와 \\n$'\\n' 수정은 보이지 않아 #33의 핵심 TODO를 모두 충족하지 못했습니다. clean_body의 grep 파이프 오류와 \\n$'\\n' 변경도 반영하고, 400자 제한과 함께 세 TODO를 모두 충족시키세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 주요 변경인 디스코드 알림 본문 길이 단일화와 정리 작업을 잘 요약합니다.
Description check ✅ Passed 본문 제한 단일화와 dead code 제거가 설명돼 있어 변경 내용과 잘 맞습니다.
Out of Scope Changes check ✅ Passed 본문 처리 단순화와 dead code 제거는 #33의 디스코드 알림 개선 범위 안에 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/root/33-discord-notification-fix

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added 😎 DevOps CI/CD, 자동화, 개발 파이프라인 관리 ♥️ 혜원 혜원양 labels Jun 26, 2026
@github-actions

Copy link
Copy Markdown

📦 번들 사이즈 리포트

🕐 Timo Web

라우트 크기 First Load JS 상태
/ 0 B 128.40 kB 🟢
/login 0 B 128.40 kB 🟢
/signup 0 B 128.40 kB 🟢

공유 번들: 128.40 kB


🟢 정상 (<200kB) 🟡 주의 (<350kB) 🔴 초과 (≥350kB) — First Load JS 기준 (gzip 크기)

빌드 커밋: 9c1b736

@yumin-kim2 yumin-kim2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

확인했습니다 수고하셨어용~~~👍

@jjangminii jjangminii left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

확인했습니당~

@ehye1
ehye1 merged commit 2755e9d into develop Jun 26, 2026
12 checks passed
@kimminna
kimminna deleted the ci/root/33-discord-notification-fix branch June 26, 2026 17:26
@kimminna kimminna mentioned this pull request Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♥️ 혜원 혜원양 😎 DevOps CI/CD, 자동화, 개발 파이프라인 관리

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] 디스코드 알림 워크플로우 버그 수정 및 개선

4 participants