Repository navigation
Conversation
|
Preview (prod) → https://255-prod.rucq-ui-preview.trapti.tech/ |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📝 WalkthroughWalkthroughCI に ESLint と Prettier の検証を追加し、回答判定・Markdown 見出し・リアクション・キャンプ操作判定の処理を更新した。あわせて複数の Vue テンプレートを整形した。 Changes品質チェックと既存処理の調整
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
Pull request overview
GitHub Actions の CI を追加し、PR/ main への push 時に ESLint と Prettier のチェックを自動実行できるようにする変更です。あわせて、CI で必要になるチェック用 npm scripts とキャッシュファイルの扱い、ならびに lint/format に伴う軽微なコード整形・型修正が含まれます。
Changes:
- GitHub Actions ワークフローを追加し、lint/format のチェックを CI で実行
lint:check/format:checkの追加と、.eslintcache/.prettier-cacheの ignore・キャッシュ設定を追加- 一部コンポーネントで optional chaining 等の小さなリファクタ・整形
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/ci.yaml |
CI を追加し、ESLint/Prettier のチェックを自動化 |
package.json |
CI 用の lint/format チェックコマンドを追加 |
.prettierignore |
Prettier 対象外ファイルを追加 |
.gitignore |
ESLint/Prettier のキャッシュファイルを ignore |
src/components/markdown/MarkdownPreview.vue |
見出し抽出処理の変更(ただし現状は型不整合が発生) |
src/components/information/QuestionGroupPanel.vue |
回答済み判定の簡略化 |
src/components/rollcall/rollCallStream.ts |
型キャスト削除・optional chaining による簡略化 |
src/store.ts |
optional chaining による簡略化 |
src/views/ActivityView.vue |
テンプレートの整形 |
src/components/layout/HeaderButton.vue |
テンプレートの整形 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| headingElements.forEach((heading) => { | ||
| const level = parseInt(heading.tagName.charAt(1)) | ||
| const id = `heading-${idCounter++}` | ||
| const text = heading.textContent ?? '' | ||
| const text = heading.textContent | ||
|
|
||
| heading.setAttribute('id', id) | ||
| headingInfos.push({ id, level, text }) |
| - name: Install dependencies | ||
| run: pnpm ci | ||
| - name: Run ESLint | ||
| run: pnpm lint:check |
There was a problem hiding this comment.
pnpm ci は pnpm v11 のサブコマンドとして存在します
https://pnpm.io/ja/cli/ci
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yaml:
- Around line 18-19: Update the actions/checkout step in the CI workflow to set
persist-credentials to false, preventing the GITHUB_TOKEN from being stored in
the repository’s Git configuration while preserving the existing checkout
behavior.
In `@package.json`:
- Around line 18-20: Align the format script’s scope with format:check by
updating the format command to process the same repository-wide target instead
of only src/. Keep the existing Prettier write behavior and leave the
format:check command unchanged.
In `@src/components/markdown/MarkdownPreview.vue`:
- Line 74: MarkdownPreview の見出し情報を生成する箇所で、heading.textContent が null
の場合に空文字列へフォールバックするよう、HeadingInfo.text に必ず string を渡してください。const text の代入を更新し、非
null の textContent はそのまま維持してください。
🪄 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: ea49b3ae-2c4e-4989-a886-73a221502e1c
📒 Files selected for processing (10)
.github/workflows/ci.yaml.gitignore.prettierignorepackage.jsonsrc/components/information/QuestionGroupPanel.vuesrc/components/layout/HeaderButton.vuesrc/components/markdown/MarkdownPreview.vuesrc/components/rollcall/rollCallStream.tssrc/store.tssrc/views/ActivityView.vue
eslintは遅いのでlintにもキャッシュを追加
kitsne241
left a comment
There was a problem hiding this comment.
概ね良さそうに見えましたが、ちょっとした気になる部分への言及を含みます! ご確認よろしくお願いします 🙏
|
|
||
| jobs: | ||
| quality: | ||
| name: Code quality |
There was a problem hiding this comment.
他のワークフローの記述を参考にしつつ、ジョブ名を
- 動詞から始まる
- 具体的な処理内容を書く
ものに変えてみるとより分かりやすくなると思います。私がパッと思いつくところだと Lint and Format とか
| - name: Install dependencies | ||
| run: pnpm ci | ||
| - name: Run ESLint | ||
| run: pnpm lint:check |
There was a problem hiding this comment.
pnpm ci は pnpm v11 のサブコマンドとして存在します
https://pnpm.io/ja/cli/ci
There was a problem hiding this comment.
ci.yaml はちょっと意味が広すぎる気がします。CIはLintとFormatのみならずビルドやテストを含む品質保証のための幅広い検証を意味するので、LintとFormatのみを主眼としているこのワークフローにci.yamlと命名すると後の混乱を生むかもしれません。代案として quality.yaml を提案してみます。Qualityという語はCIの文脈では「静的に検証できる範囲の品質」を意味することが多いようです
余談:(さっき私も初めて知ったんですが、pnpm ci のCIは Continuous Integration というよりは Clean Install らしい)
There was a problem hiding this comment.
今後ci.yamlにつけ足していく or 多そうならディレクトリを増やすかな~と思っていたけど
後者の場合だとquality.yaml的なものが生えそうなのでそうします!
| *.tsbuildinfo | ||
|
|
||
| .eslintcache | ||
| .prettier-cache |
There was a problem hiding this comment.
一応確認しておくと、ワークフローにてPrettierのキャッシュは保存しないことにしたけど将来的にやっぱり保存する可能性もあるので記述のみ .gitignore に残した、という理解でよいですか?
There was a problem hiding this comment.
すみません!!実行時間が十分早かったのでキャッシュなくしたのですが、gitignoreから消し忘れてました!!
- ファイル名の変更 ci -> quality - gitignoreにあるprettierのcacheを削除
kitsne241
left a comment
There was a problem hiding this comment.
見ました! 今度こそ本物のApproveです。レビュー箇所がいい感じに直っていて良さそうです 👍
ciを追加しました
#253 とeslinitのチェックなどで変更箇所が一部被ってます
Summary by CodeRabbit
新機能
バグ修正
nullの回答を正しく扱えるよう改善しました。改善