-
Notifications
You must be signed in to change notification settings - Fork 4
feat: optimize monorepo with auto PR labeling, CI improvements, and s… #402
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
Conversation
Walkthrough이 PR은 모노레포 개발 환경을 표준화하고 자동화하는 여러 개의 조율된 변경사항들을 포함합니다.
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In @.github/workflows/ci.yml:
- Around line 62-63: Add a "typecheck" script to the Admin package.json (e.g.,
"typecheck": "tsc --noEmit") so the project uses the existing tsconfig.json for
static checks, and update the CI workflow step that runs Admin checks to execute
that script (either by calling the Admin ci:check that runs lint + typecheck or
by adding a dedicated step to run pnpm --filter `@solid-connect/admin` run
typecheck). Target the package.json "scripts" entry named "typecheck" and the CI
job step that currently runs lint/format to ensure typecheck runs in CI.
In `@apps/admin/biome.json`:
- Line 2: The apps/admin biome schema version in biome.json
("https://biomejs.dev/schemas/2.3.12/schema.json") is incompatible with the
installed Biome CLI; either change the schema URL to the CLI-compatible version
(downgrade to 2.2.4) or upgrade the local Biome package so the CLI matches the
project standard: update the `@biomejs/biome` entry in apps/admin/package.json to
2.3.11 (to align with root and apps/web) and reinstall dependencies so the CLI
and the schema version are consistent.
In `@apps/web/biome.json`:
- Line 2: The "$schema" entry in apps/web/biome.json currently points to 2.3.12
which mismatches the installed Biome CLI (2.3.11); update the "$schema" value in
apps/web/biome.json to "https://biomejs.dev/schemas/2.3.11/schema.json" (or
alternatively upgrade the Biome CLI dependency in package.json to 2.3.12+) so
the schema version and CLI version align, ensuring tools like biome lint/format
validate correctly.
🧹 Nitpick comments (2)
.github/workflows/pr-auto-label.yml (1)
22-46: Fork에서 생성된 PR의 경우BASE_SHA를 가져올 수 없을 수 있습니다.Fork 기반 PR이나 base 브랜치가 로컬에 없는 경우,
BASE_SHA가 존재하지 않아git diff명령이 실패할 수 있습니다. CI 워크플로우에서 사용하는dorny/paths-filter는 이런 엣지 케이스를 내부적으로 처리합니다.🔧 BASE_SHA fetch 추가 제안
- name: Detect changed apps id: detect run: | # Get changed files between base and head BASE_SHA="${{ github.event.pull_request.base.sha }}" HEAD_SHA="${{ github.event.pull_request.head.sha }}" + # Ensure base SHA is available + git fetch origin $BASE_SHA --depth=1 || true + FILES=$(git diff --name-only $BASE_SHA $HEAD_SHA)또는
ci.yml에서 사용하는dorny/paths-filter@v3를 이 워크플로우에서도 사용하면 코드 일관성과 안정성을 모두 확보할 수 있습니다..github/workflows/ci.yml (1)
44-60: 반복되는 환경 설정 단계를 재사용 가능한 워크플로우로 추출하는 것을 고려해보세요.현재 4개의 job 모두에서 동일한 패턴이 반복됩니다:
- Checkout
- Install pnpm (version: 9)
- Setup Node.js (version: 22.x)
- Install dependencies
이는 당장 문제가 되지는 않지만, 향후 Node.js나 pnpm 버전 업데이트 시 4곳을 모두 수정해야 합니다.
🔄 Composite Action 또는 Reusable Workflow 예시
.github/actions/setup-monorepo/action.yml생성:name: Setup Monorepo description: Setup pnpm and Node.js for monorepo runs: using: composite steps: - name: Install pnpm uses: pnpm/action-setup@v3 with: version: 9 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: "22.x" cache: "pnpm" - name: Install dependencies shell: bash run: pnpm install --frozen-lockfile그 후 각 job에서 사용:
steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-monorepo현재 구조도 충분히 작동하므로, 필요할 때 리팩토링하셔도 됩니다.
Also applies to: 71-87
| - name: Run checks (lint & typecheck) | ||
| run: pnpm --filter @solid-connect/web run ci:check |
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.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
echo "=== Checking workflow file structure ==="
cat .github/workflows/ci.yml | grep -n -A 2 "Web\|Admin\|pnpm --filter" | head -50
echo ""
echo "=== Web app package.json scripts ==="
if [ -f "apps/web/package.json" ]; then
jq '.scripts' apps/web/package.json 2>/dev/null || cat apps/web/package.json | grep -A 20 '"scripts"'
else
echo "apps/web/package.json not found"
fi
echo ""
echo "=== Admin app package.json scripts ==="
if [ -f "apps/admin/package.json" ]; then
jq '.scripts' apps/admin/package.json 2>/dev/null || cat apps/admin/package.json | grep -A 20 '"scripts"'
else
echo "apps/admin/package.json not found"
fi
echo ""
echo "=== Checking for TypeScript config in Admin ==="
ls -la apps/admin/ | grep -E "tsconfig|typescript"Repository: solid-connection/solid-connect-web
Length of output: 1840
Admin 앱의 CI 품질 체크에서 typecheck가 누락되었습니다.
검증 결과를 통해 다음과 같이 확인되었습니다:
-
Web 앱의 quality check 명령어
- CI 실행 명령:
pnpm --filter@solid-connect/webrun ci:check - 실제 동작:
lint:check(biome 린트) +typecheck(tsc 타입 체크) 순차 실행
- CI 실행 명령:
-
Admin 앱의 quality check 명령어
- CI 실행 명령:
lint+format(각각 별도 스텝) - 타입 체크 스크립트: package.json에 정의되지 않음
- TypeScript 설정:
tsconfig.json파일이 존재함 (활성화 상태)
- CI 실행 명령:
Admin 앱은 TypeScript가 설정되어 있음에도 불구하고 CI 워크플로우에서 타입 체크를 수행하지 않고 있습니다. Web 앱과의 일관성을 위해 Admin 앱의 package.json에 typecheck 스크립트를 추가하고 CI 단계에서 실행하도록 수정이 필요합니다.
🤖 Prompt for AI Agents
In @.github/workflows/ci.yml around lines 62 - 63, Add a "typecheck" script to
the Admin package.json (e.g., "typecheck": "tsc --noEmit") so the project uses
the existing tsconfig.json for static checks, and update the CI workflow step
that runs Admin checks to execute that script (either by calling the Admin
ci:check that runs lint + typecheck or by adding a dedicated step to run pnpm
--filter `@solid-connect/admin` run typecheck). Target the package.json "scripts"
entry named "typecheck" and the CI job step that currently runs lint/format to
ensure typecheck runs in CI.
| "quoteStyle": "double" | ||
| } | ||
| } | ||
| "$schema": "https://biomejs.dev/schemas/2.3.12/schema.json", |
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.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check Biome CLI version in package.json and pnpm-lock.yaml
echo "=== Checking package.json for Biome CLI ==="
rg -n '"@biomejs/cli"' -A 1 -B 1 package.json 2>/dev/null || echo "Not found in root package.json"
echo -e "\n=== Checking apps/admin/package.json ==="
rg -n '"@biomejs/cli"' -A 1 -B 1 apps/admin/package.json 2>/dev/null || echo "Not found"
echo -e "\n=== Checking pnpm-lock.yaml for `@biomejs/cli` version ==="
rg -n '@biomejs/cli@' pnpm-lock.yaml | head -20
echo -e "\n=== Checking apps/admin/biome.json ==="
cat apps/admin/biome.json 2>/dev/null || echo "File not found"Repository: solid-connection/solid-connect-web
Length of output: 1039
🏁 Script executed:
#!/bin/bash
# Find all package.json files and search for biome
echo "=== Finding all package.json files ==="
find . -name "package.json" -type f | head -20
echo -e "\n=== Searching for 'biome' in all package.json files ==="
rg -l 'biome' . --type json 2>/dev/null | grep package.json
echo -e "\n=== Searching for biome in all files (broader search) ==="
rg 'biome|@biomejs' --type json -i | head -30
echo -e "\n=== Checking for .biomeignore or other Biome config ==="
find . -name ".biomeignore" -o -name "biome.json" | head -20
echo -e "\n=== Checking root-level package.json content ==="
head -50 package.json 2>/dev/null || echo "No root package.json"Repository: solid-connection/solid-connect-web
Length of output: 2042
Biome 스키마 버전이 CLI 버전과 맞지 않아 린트 실패를 일으킵니다.
apps/admin의 Biome CLI는 2.2.4 버전인데, biome.json에는 2.3.12 스키마가 선언되어 있어 호환성 문제가 발생합니다. 다음 두 가지 방법 중 하나로 정합성을 맞춰주세요.
-
스키마를 CLI 버전에 맞춰 다운그레이드
- apps/admin/biome.json의 스키마를 2.2.4로 변경
-
CLI 버전을 프로젝트 표준에 맞춰 업그레이드
- apps/admin/package.json의
@biomejs/biome을2.3.11로 변경해 루트 패키지와 동기화
- apps/admin/package.json의
(참고: apps/web와 루트 설정은 모두 2.3.11을 사용하고 있습니다.)
🧰 Tools
🪛 GitHub Actions: CI
[error] 2-2: Configuration schema version does not match the CLI version 2.2.4. Found 2.3.12. Run 'biome migrate' to migrate the configuration file.
🤖 Prompt for AI Agents
In `@apps/admin/biome.json` at line 2, The apps/admin biome schema version in
biome.json ("https://biomejs.dev/schemas/2.3.12/schema.json") is incompatible
with the installed Biome CLI; either change the schema URL to the CLI-compatible
version (downgrade to 2.2.4) or upgrade the local Biome package so the CLI
matches the project standard: update the `@biomejs/biome` entry in
apps/admin/package.json to 2.3.11 (to align with root and apps/web) and
reinstall dependencies so the CLI and the schema version are consistent.
| @@ -1,41 +1,22 @@ | |||
| { | |||
| "$schema": "https://biomejs.dev/schemas/2.3.12/schema.json", | |||
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.
🧩 Analysis chain
🏁 Script executed:
# biome.json 파일 위치 확인
find . -name "biome.json" -type f | head -20Repository: solid-connection/solid-connect-web
Length of output: 136
🏁 Script executed:
# package.json에서 biome 버전 확인
fd "package.json" -x cat {} + | jq -r '.devDependencies.biome // .dependencies.biome // empty' 2>/dev/null | head -5Repository: solid-connection/solid-connect-web
Length of output: 213
🏁 Script executed:
# 모든 biome.json 파일 검색 및 스키마 버전 확인
fd "biome.json" -x grep -n "\$schema" {} +Repository: solid-connection/solid-connect-web
Length of output: 453
🏁 Script executed:
# CI/CD 파일에서 biome 버전 명시 확인
fd -e yml -e yaml | xargs grep -l "biome" 2>/dev/nullRepository: solid-connection/solid-connect-web
Length of output: 92
🏁 Script executed:
# 프로젝트 루트의 package.json에서 biome 버전 확인
fd "package.json" -t f -x grep -A 2 -B 2 '"biome"' {} \; | head -30Repository: solid-connection/solid-connect-web
Length of output: 198
🏁 Script executed:
# pnpm-lock.yaml에서 biome 버전 확인
grep -A 5 '"biome"' pnpm-lock.yaml | head -20Repository: solid-connection/solid-connect-web
Length of output: 60
🏁 Script executed:
# CI/CD 설정 파일 찾기
fd -e yml -e yaml | grep -E "(github|gitlab|circle|workflow)"Repository: solid-connection/solid-connect-web
Length of output: 60
🏁 Script executed:
# 프로젝트 루트의 package.json 내용 확인
test -f package.json && cat -n package.json | head -50Repository: solid-connection/solid-connect-web
Length of output: 741
🏁 Script executed:
# 모든 package.json 파일 위치 확인
fd "package.json" -t fRepository: solid-connection/solid-connect-web
Length of output: 165
🏁 Script executed:
# .github/workflows 확인
ls -la .github/workflows/ 2>/dev/null || echo "No GitHub workflows found"Repository: solid-connection/solid-connect-web
Length of output: 652
🏁 Script executed:
# apps/web package.json 확인
cat -n apps/web/package.json | head -50Repository: solid-connection/solid-connect-web
Length of output: 1958
🏁 Script executed:
# apps/admin package.json 확인
cat -n apps/admin/package.json | head -50Repository: solid-connection/solid-connect-web
Length of output: 1939
🏁 Script executed:
# 모든 biome.json 파일의 전체 내용 확인
echo "=== Root biome.json ===" && cat biome.json && echo -e "\n=== apps/web/biome.json ===" && cat apps/web/biome.json && echo -e "\n=== apps/admin/biome.json ===" && cat apps/admin/biome.jsonRepository: solid-connection/solid-connect-web
Length of output: 4716
🏁 Script executed:
# ci.yml 파일 확인 - biome 관련 부분
grep -n -A 5 -B 5 "biome\|lint" .github/workflows/ci.yml | head -60Repository: solid-connection/solid-connect-web
Length of output: 727
Biome 스키마 버전 불일치로 여러 앱에서 CI 실패 위험이 있습니다.
각 앱마다 상황이 다르므로 다음과 같이 수정이 필요합니다:
-
apps/admin/biome.json- 긴급 수정 필요- 현재 상태: Biome CLI 2.2.4와 스키마 2.3.12 불일치
- 문제: 메이저 버전 차이로 CI에서
biome lint,biome format실패 가능 - 해결 방법:
- 옵션 A:
apps/admin/package.json에서 Biome을 2.3.12+로 업그레이드 - 옵션 B: 스키마를 2.2.4로 낮추기
- 옵션 A:
- 권장: 옵션 A (루트 버전 2.3.11과 통일하거나 최신 버전 사용)
-
apps/web/biome.json- 스키마 버전 수정- 현재 상태: Biome CLI 2.3.11과 스키마 2.3.12 불일치
- 문제: 패치 버전 차이지만 스키마 검증 시 실패 가능
- 해결 방법:
- "$schema": "https://biomejs.dev/schemas/2.3.12/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "$schema": "https://biomejs.dev/schemas/2.3.12/schema.json", | |
| "$schema": "https://biomejs.dev/schemas/2.3.11/schema.json", |
🧰 Tools
🪛 GitHub Actions: CI
[error] 2-2: Configuration schema version does not match the CLI version 2.2.4. Found 2.3.12. Run 'biome migrate' to migrate the configuration file.
🤖 Prompt for AI Agents
In `@apps/web/biome.json` at line 2, The "$schema" entry in apps/web/biome.json
currently points to 2.3.12 which mismatches the installed Biome CLI (2.3.11);
update the "$schema" value in apps/web/biome.json to
"https://biomejs.dev/schemas/2.3.11/schema.json" (or alternatively upgrade the
Biome CLI dependency in package.json to 2.3.12+) so the schema version and CLI
version align, ensuring tools like biome lint/format validate correctly.
관련 이슈
작업 내용
…hared configs
특이 사항
리뷰 요구사항 (선택)