Skip to content
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

[COZY-478] fix: 깃허브 액션 에러 해결 #241

Merged
merged 1 commit into from
Jan 15, 2025
Merged

Conversation

eple0329
Copy link
Member

@eple0329 eple0329 commented Jan 15, 2025

⚒️develop의 최신 커밋을 pull 받았나요?

#️⃣ 작업 내용

어떤 기능을 구현했나요?
기존 기능에서 어떤 점이 달라졌나요?
자세한 로직이 필요하다면 함께 적어주세요!
코드에 대한 설명이라면, 코맨트를 통해서 어떤 부분이 어떤 코드인지 설명해주세요!

PR 리마인더 깃허브 액션에서, 스케줄러는 정상 동작했지만, invalid json 문제로 인해 전송이 되지 않는 문제가 있어 해결했습니다.

동작 확인

기능을 실행했을 때 정상 동작하는지 여부를 확인하고 스샷을 올려주세요

image

💬 리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요
고민사항도 적어주세요.

Summary by CodeRabbit

  • Chores
    • GitHub Actions 워크플로우 파일의 PR 리뷰 알림 로직 개선
    • 메시지 생성 및 전송 프로세스의 안정성 향상
    • Discord 웹훅 메시지 전송 시 오류 처리 및 유효성 검사 강화

Copy link

coderabbitai bot commented Jan 15, 2025

Caution

Review failed

The pull request is closed.

워크스루

이 변경 사항은 GitHub 워크플로우 파일 .github/workflows/pr_review_reminder.yml에서 Pull Request 알림 로직을 개선합니다. 주요 변경 사항은 메시지 생성 및 전송 프로세스의 안정성을 높이는 것입니다. 메시지 출력을 위한 echo 명령이 주석 처리되고, 새로운 CLEANED_MESSAGE 변수가 도입되어 메시지의 특수 문자를 제거하고 JSON 안전성을 보장합니다.

JSON 페이로드 생성 로직이 업데이트되었으며, 메시지 길이가 2000자를 초과하지 않도록 검증 단계가 추가되었습니다. jq를 사용하여 JSON 유효성을 확인하고, Discord 웹훅으로 메시지를 전송하는 curl 명령이 수정되었습니다. 이러한 변경은 메시지 전송 프로세스의 오류 처리 및 유효성 검사를 개선합니다.

시퀀스 다이어그램

sequenceDiagram
    participant Workflow
    participant MessageProcessor
    participant JSONValidator
    participant DiscordWebhook

    Workflow->>MessageProcessor: 메시지 생성
    MessageProcessor-->>MessageProcessor: 메시지 정리 및 특수 문자 제거
    MessageProcessor->>JSONValidator: JSON 페이로드 생성
    JSONValidator-->>JSONValidator: 메시지 길이 확인
    JSONValidator-->>JSONValidator: JSON 유효성 검사
    JSONValidator->>DiscordWebhook: JSON 페이로드 전송
    DiscordWebhook-->>Workflow: 전송 결과 반환
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bd8568b and b44ecef.

📒 Files selected for processing (1)
  • .github/workflows/pr_review_reminder.yml (1 hunks)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@eple0329 eple0329 merged commit 88fafbf into develop Jan 15, 2025
1 of 2 checks passed
@eple0329 eple0329 deleted the fix/COZY-478 branch January 15, 2025 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant