Conversation
- prettier --check . 로 prettier 포맷 검사
- PR 생성 시 lint, format:check, build 자동 실행 (pr-ci.yml) - main 머지 시 S3 업로드 및 CloudFront 캐시 무효화 (front-deploy.yml) - format:check 스크립트 package.json에 추가
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (3)
📝 WalkthroughWalkthroughPR용 CI 워크플로우와 메인 브랜치 대상 프론트엔드 배포 워크플로우가 추가되었습니다. PR CI는 설치·린트·포맷 검사·빌드를 실행하고, 배포 워크플로우는 빌드 결과( Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant GH as GitHub Actions
participant Node as Build (Node/Yarn)
participant S3 as AWS S3
participant CF as CloudFront
Dev->>GH: push to main / open PR
alt PR workflow
GH->>Node: setup Node 22 + Corepack\nyarn install --immutable\nyarn lint\nyarn format:check\nyarn build
Node-->>GH: build result / status
else Deploy workflow (main)
GH->>Node: setup Node 22 + Corepack\nyarn install --immutable\nyarn build -> dist/
Node-->>GH: dist/
GH->>S3: aws s3 sync dist/ -> s3://BUCKET --delete
S3-->>GH: sync complete
GH->>CF: create-invalidation "/*" (Distribution ID from Secrets)
CF-->>GH: invalidation queued
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
.github/workflows/front-deploy.yml (1)
8-10: 배포 동시 실행 방지를 위해concurrency추가를 권장합니다.빠른 연속 머지 시 이전 실행이 늦게 끝나면 최신 산출물을 덮어쓸 수 있습니다.
cancel-in-progress로 최신 배포만 유지하세요.수정 예시
jobs: deploy: + concurrency: + group: frontend-deploy-main + cancel-in-progress: true runs-on: ubuntu-latest🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/front-deploy.yml around lines 8 - 10, Add a GitHub Actions concurrency policy to the deploy job to prevent overlapping deployments: in the workflow's deploy job (job name "deploy") add a top-level "concurrency" block with a unique group (e.g., using github.ref or github.workflow combined with the environment) and "cancel-in-progress: true" so any in-progress deploy is cancelled when a newer run starts, ensuring only the latest deployment proceeds..github/workflows/pr-ci.yml (1)
8-12: 워크플로 토큰 권한을 최소화하는 것이 안전합니다.현재 권한이 명시되지 않아 저장소 기본 설정에 의존합니다. 이 Job은 쓰기 권한이 필요 없으므로 최소 권한을 명시하는 편이 안전합니다.
수정 예시
on: pull_request: +permissions: + contents: read + jobs: check:🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/pr-ci.yml around lines 8 - 12, The workflow's check job currently relies on repository defaults for permissions; update the job named "check" in .github/workflows/pr-ci.yml to explicitly set minimal permissions (e.g., add a permissions block such as permissions: contents: read) under the check job so it does not inherit broader write access from repo defaults.
🤖 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/front-deploy.yml:
- Around line 13-19: The workflow fails because Yarn 4.13.0 from packageManager
is not enabled before setup-node runs; add a step that runs corepack enable (and
optionally corepack prepare yarn@4.13.0 --activate) before the
actions/setup-node@v4 step so the runner uses Yarn 4.13.0 when executing yarn
install --immutable and yarn build; update the job steps to insert this corepack
command prior to the existing uses: actions/setup-node@v4 and subsequent runs so
cache/version checks succeed.
- Around line 22-27: Replace the static AWS secrets usage in the GitHub Action
step that uses aws-actions/configure-aws-credentials@v4 (currently passing
secrets.AWS_ACCESS_KEY_ID and secrets.AWS_SECRET_ACCESS_KEY) with OIDC-based
role assumption: remove the aws-access-key-id and aws-secret-access-key inputs,
add the role-to-assume input pointing to the IAM role ARN configured for GitHub
OIDC, keep aws-region (secrets.AWS_REGION) as before, and ensure the workflow
uses the aws-actions/configure-aws-credentials action's OIDC flow so the job
obtains temporary credentials from the identity provider instead of long-lived
keys.
In @.github/workflows/pr-ci.yml:
- Around line 16-23: The workflow runs actions/setup-node@v4 before enabling
Corepack which causes CI to fail for packageManager "yarn@4.13.0"; move a step
that runs "corepack enable" to execute before the actions/setup-node@v4 step so
Corepack is active when node is configured and before the "yarn install
--immutable" step runs; ensure the new pre-setup-node step is placed above the
actions/setup-node@v4 entry and clearly precedes the existing "node-version: 22"
and "cache: yarn" configuration.
---
Nitpick comments:
In @.github/workflows/front-deploy.yml:
- Around line 8-10: Add a GitHub Actions concurrency policy to the deploy job to
prevent overlapping deployments: in the workflow's deploy job (job name
"deploy") add a top-level "concurrency" block with a unique group (e.g., using
github.ref or github.workflow combined with the environment) and
"cancel-in-progress: true" so any in-progress deploy is cancelled when a newer
run starts, ensuring only the latest deployment proceeds.
In @.github/workflows/pr-ci.yml:
- Around line 8-12: The workflow's check job currently relies on repository
defaults for permissions; update the job named "check" in
.github/workflows/pr-ci.yml to explicitly set minimal permissions (e.g., add a
permissions block such as permissions: contents: read) under the check job so it
does not inherit broader write access from repo defaults.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a3880394-d84a-4bf9-b56c-833d61b47157
📒 Files selected for processing (3)
.github/workflows/front-deploy.yml.github/workflows/pr-ci.ymlpackage.json
- CI 환경의 기본 yarn이 v1이라 yarn berry 실행 불가 문제 수정 - corepack이 package.json의 packageManager 필드를 읽어 yarn@4.13.0으로 자동 전환"
- yarn berry 버전 불일치 오류 수정 - corepack이 먼저 활성화되어야 setup-node의 cache가 올바르게 동작
- .yarn/sdks, .pnp.cjs 등 yarn berry 내부 파일이 lint 대상에 포함되는 문제 수정
e0a126e to
e02db84
Compare
- .yarn, .pnp 파일을 prettier 검사 대상에서 제외 - issue-template.md prettier 포맷 적용
#️⃣ 관련 이슈
⏰ 작업 시간
💻 작업 내용
GitHub Actions
pr-ci.yml)front-deploy.yml)AWS
home-protect-client)기타
format:check스크립트package.json에 추가 작업하면서 고민한 부분
👀 리뷰 포인트
📘 참고 자료
Summary by CodeRabbit