Skip to content

ci : formatとlintのチェックを追加 - #255

Merged
mumumu6 merged 6 commits into
mainfrom
feat/ci
Sep 1, 2026
Merged

mumumu6 merged 6 commits into
mainfrom
feat/ci

Conversation

@mumumu6

@mumumu6 mumumu6 commented Jul 13, 2026 •

Copy link
Copy Markdown
Member

ciを追加しました

#253 とeslinitのチェックなどで変更箇所が一部被ってます

Summary by CodeRabbit

  • 新機能

    • プルリクエストやメインブランチへの変更時に、Lint・フォーマットチェックを自動実行するCIを追加しました。
  • バグ修正

    • 質問への回答状況を判定する際、null の回答を正しく扱えるよう改善しました。
    • ロールコールのリアクション選択や活動状態の判定を安定化しました。
  • 改善

    • Markdown見出し情報の取得処理を整理しました。
    • Lint・フォーマット用のチェックコマンドを追加しました。

Copilot AI review requested due to automatic review settings July 13, 2026 18:17
@github-actions

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 43d03ec9-21f9-4ecb-916b-779b78451e6c

📝 Walkthrough

Walkthrough

CI に ESLint と Prettier の検証を追加し、回答判定・Markdown 見出し・リアクション・キャンプ操作判定の処理を更新した。あわせて複数の Vue テンプレートを整形した。

Changes

品質チェックと既存処理の調整

Layer / File(s) Summary
品質チェックの定義と実行
.github/workflows/ci.yaml, package.json, .gitignore, .prettierignore
lint/format 用スクリプト、Prettier の対象外設定、キャッシュ除外設定、GitHub Actions の quality ジョブを追加した。
条件判定と型処理の更新
src/components/information/QuestionGroupPanel.vue, src/components/markdown/MarkdownPreview.vue, src/components/rollcall/rollCallStream.ts, src/store.ts
回答値、見出しテキスト、リアクション反映、キャンプ操作可否の判定と型キャストを更新した。
テンプレートの整形
src/components/layout/HeaderButton.vue, src/views/ActivityView.vue
アイコン画像とアクティビティ表示部分のテンプレート表記を整形した。

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • traPtitech/rucQ-UI#210: ActivityView.vue のアクティビティ表示コンポーネントに関連する更新。

Suggested reviewers: copilot, kitsne241, ras0q

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed CIにformatとlintのチェックを追加する内容で、変更点を適切に要約しています。
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ci

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 71 to 77
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 })
Comment on lines +37 to +40
- name: Install dependencies
run: pnpm ci
- name: Run ESLint
run: pnpm lint:check

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm ci は pnpm v11 のサブコマンドとして存在します
https://pnpm.io/ja/cli/ci

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between ca4407a and b7780fa.

📒 Files selected for processing (10)
  • .github/workflows/ci.yaml
  • .gitignore
  • .prettierignore
  • package.json
  • src/components/information/QuestionGroupPanel.vue
  • src/components/layout/HeaderButton.vue
  • src/components/markdown/MarkdownPreview.vue
  • src/components/rollcall/rollCallStream.ts
  • src/store.ts
  • src/views/ActivityView.vue

Comment thread .github/workflows/quality.yaml
Comment thread package.json Outdated
Comment thread src/components/markdown/MarkdownPreview.vue

@kitsne241 kitsne241 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

概ね良さそうに見えましたが、ちょっとした気になる部分への言及を含みます! ご確認よろしくお願いします 🙏

Comment thread .github/workflows/ci.yaml Outdated

jobs:
quality:
name: Code quality

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

他のワークフローの記述を参考にしつつ、ジョブ名を

  • 動詞から始まる
  • 具体的な処理内容を書く

ものに変えてみるとより分かりやすくなると思います。私がパッと思いつくところだと Lint and Format とか

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

より具体的な方が分かりやすいのでそうします!

Comment on lines +37 to +40
- name: Install dependencies
run: pnpm ci
- name: Run ESLint
run: pnpm lint:check

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm ci は pnpm v11 のサブコマンドとして存在します
https://pnpm.io/ja/cli/ci

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ci.yaml はちょっと意味が広すぎる気がします。CIはLintとFormatのみならずビルドやテストを含む品質保証のための幅広い検証を意味するので、LintとFormatのみを主眼としているこのワークフローにci.yamlと命名すると後の混乱を生むかもしれません。代案として quality.yaml を提案してみます。Qualityという語はCIの文脈では「静的に検証できる範囲の品質」を意味することが多いようです

余談:(さっき私も初めて知ったんですが、pnpm ci のCIは Continuous Integration というよりは Clean Install らしい)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

今後ci.yamlにつけ足していく or 多そうならディレクトリを増やすかな~と思っていたけど
後者の場合だとquality.yaml的なものが生えそうなのでそうします!

Comment thread src/components/markdown/MarkdownPreview.vue
Comment thread .gitignore Outdated
*.tsbuildinfo

.eslintcache
.prettier-cache

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一応確認しておくと、ワークフローにてPrettierのキャッシュは保存しないことにしたけど将来的にやっぱり保存する可能性もあるので記述のみ .gitignore に残した、という理解でよいですか?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

すみません!!実行時間が十分早かったのでキャッシュなくしたのですが、gitignoreから消し忘れてました!!

- ファイル名の変更 ci -> quality
- gitignoreにあるprettierのcacheを削除
@mumumu6
mumumu6 requested a review from kitsne241 August 30, 2026 14:05

@kitsne241 kitsne241 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

編集済

すみません嘘Approveしました! ApproveするPRをまちがえた…

@kitsne241
kitsne241 self-requested a review August 30, 2026 14:27
kitsne241
kitsne241 previously approved these changes Aug 30, 2026

@kitsne241 kitsne241 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

見ました! 今度こそ本物のApproveです。レビュー箇所がいい感じに直っていて良さそうです 👍

@mumumu6
mumumu6 requested a review from kitsne241 August 30, 2026 15:23
@mumumu6
mumumu6 merged commit 636a0d8 into main Sep 1, 2026
7 checks passed
@mumumu6
mumumu6 deleted the feat/ci branch September 1, 2026 10:19
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.

3 participants