-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| name: Auto Label PR | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
|
|
||
| jobs: | ||
| label: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - 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 }}" | ||
|
|
||
| FILES=$(git diff --name-only $BASE_SHA $HEAD_SHA) | ||
|
|
||
| echo "Changed files:" | ||
| echo "$FILES" | ||
|
|
||
| # Check for web changes | ||
| if echo "$FILES" | grep -q "^apps/web/"; then | ||
| echo "web=true" >> $GITHUB_OUTPUT | ||
| echo "✓ Detected changes in apps/web" | ||
| else | ||
| echo "web=false" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| # Check for admin changes | ||
| if echo "$FILES" | grep -q "^apps/admin/"; then | ||
| echo "admin=true" >> $GITHUB_OUTPUT | ||
| echo "✓ Detected changes in apps/admin" | ||
| else | ||
| echo "admin=false" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| - name: Add labels | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
| const labels = []; | ||
|
|
||
| if ('${{ steps.detect.outputs.web }}' === 'true') { | ||
| labels.push('web'); | ||
| } | ||
|
|
||
| if ('${{ steps.detect.outputs.admin }}' === 'true') { | ||
| labels.push('admin'); | ||
| } | ||
|
|
||
| if (labels.length > 0) { | ||
| console.log(`Adding labels: ${labels.join(', ')}`); | ||
|
|
||
| await github.rest.issues.addLabels({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.issue.number, | ||
| labels: labels | ||
| }); | ||
| } else { | ||
| console.log('No app-specific changes detected'); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,42 @@ | ||
| { | ||
| "$schema": "https://biomejs.dev/schemas/2.2.4/schema.json", | ||
| "vcs": { | ||
| "enabled": false, | ||
| "clientKind": "git", | ||
| "useIgnoreFile": false | ||
| }, | ||
| "files": { | ||
| "ignoreUnknown": false, | ||
| "includes": [ | ||
| "**/src/**/*", | ||
| "**/.vscode/**/*", | ||
| "**/index.html", | ||
| "**/vite.config.ts", | ||
| "!**/src/routeTree.gen.ts", | ||
| "!**/src/styles.css" | ||
| ] | ||
| }, | ||
| "formatter": { | ||
| "enabled": true, | ||
| "indentStyle": "tab" | ||
| }, | ||
| "assist": { "actions": { "source": { "organizeImports": "on" } } }, | ||
| "linter": { | ||
| "enabled": true, | ||
| "rules": { | ||
| "recommended": true | ||
| } | ||
| }, | ||
| "javascript": { | ||
| "formatter": { | ||
| "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 commentThe 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 스키마가 선언되어 있어 호환성 문제가 발생합니다. 다음 두 가지 방법 중 하나로 정합성을 맞춰주세요.
(참고: 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 |
||
| "vcs": { | ||
| "enabled": false, | ||
| "clientKind": "git", | ||
| "useIgnoreFile": false | ||
| }, | ||
| "files": { | ||
| "ignoreUnknown": false, | ||
| "includes": [ | ||
| "**/src/**/*", | ||
| "**/.vscode/**/*", | ||
| "**/index.html", | ||
| "**/vite.config.ts", | ||
| "!**/src/routeTree.gen.ts", | ||
| "!**/src/styles.css" | ||
| ] | ||
| }, | ||
| "formatter": { | ||
| "enabled": true, | ||
| "indentStyle": "tab", | ||
| "lineWidth": 120 | ||
| }, | ||
| "assist": { | ||
| "actions": { | ||
| "source": { | ||
| "organizeImports": "on" | ||
| } | ||
| } | ||
| }, | ||
| "linter": { | ||
| "enabled": true, | ||
| "rules": { | ||
| "recommended": true | ||
| } | ||
| }, | ||
| "javascript": { | ||
| "formatter": { | ||
| "quoteStyle": "double" | ||
| } | ||
| } | ||
| } | ||
|
|
||
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:
Repository: solid-connection/solid-connect-web
Length of output: 1840
Admin 앱의 CI 품질 체크에서 typecheck가 누락되었습니다.
검증 결과를 통해 다음과 같이 확인되었습니다:
Web 앱의 quality check 명령어
pnpm --filter@solid-connect/webrun ci:checklint:check(biome 린트) +typecheck(tsc 타입 체크) 순차 실행Admin 앱의 quality check 명령어
lint+format(각각 별도 스텝)tsconfig.json파일이 존재함 (활성화 상태)Admin 앱은 TypeScript가 설정되어 있음에도 불구하고 CI 워크플로우에서 타입 체크를 수행하지 않고 있습니다. Web 앱과의 일관성을 위해 Admin 앱의 package.json에
typecheck스크립트를 추가하고 CI 단계에서 실행하도록 수정이 필요합니다.🤖 Prompt for AI Agents