Skip to content

ci: 🤖 品質向上ワークフローを導入 - #30

Merged
genzouw merged 11 commits into
mainfrom
chore/quality-tooling
May 20, 2026
Merged

genzouw merged 11 commits into
mainfrom
chore/quality-tooling

Conversation

@genzouw

@genzouw genzouw commented May 20, 2026 •

Copy link
Copy Markdown
Owner

概要

toique の品質向上対応を横展開し、本リポジトリにも静的解析・セキュリティスキャン系の GitHub Actions と PR テンプレート、markdownlint 設定を導入する。

追加ファイル

  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/workflows/gitleaks.yml
  • .github/workflows/actionlint.yml
  • .github/workflows/codeql.yml (JS 用)
  • .github/workflows/markdownlint.yml
  • .markdownlint-cli2.jsonc

設計判断

  • リポジトリの言語 (JavaScript) に応じてフィット導入。CodeQL は JS 版を採用。
  • Trivy は Dockerfile が無いため対象外としてスキップ。
  • 既存ファイル (dependabot / CodeRabbit / Gemini) は上書きせずスキップ。

動作確認

  • CI で新規 workflow が想定通り起動するか
  • Gitleaks 初回スキャン結果に対応が必要な指摘がないか

Summary by CodeRabbit

  • Chores
    • プルリクエスト説明テンプレートを追加し、項目・セルフチェックを標準化
    • actionlint/CodeQL/gitleaks/markdownlint の CI ワークフローを追加
    • markdownlint-cli2 の設定を追加しルールを調整
    • 複雑度チェックのサマリー追記方式を改善
    • デプロイ時の S3 パス補間で引用を明確化
    • commitlint 設定を追加しコミット規約を明文化

Review Change Stack

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

本プルリクエストは、プロジェクトの品質向上を目的として、GitHub Actionsによる自動化ワークフローと標準的なドキュメント管理設定を導入するものです。静的解析やセキュリティチェックをCIパイプラインに組み込むことで、開発プロセスの効率化とコード品質の安定化を図ります。

Highlights

  • 品質向上ワークフローの導入: リポジトリ全体の品質を向上させるため、静的解析やセキュリティスキャンを実行するGitHub Actionsを複数導入しました。
  • ドキュメント管理の強化: PRテンプレートの追加およびmarkdownlintの設定ファイルを追加し、ドキュメントの標準化と品質維持をサポートします。
Ignored Files
  • Ignored by pattern: .github/workflows/** (4)
    • .github/workflows/actionlint.yml
    • .github/workflows/codeql.yml
    • .github/workflows/gitleaks.yml
    • .github/workflows/markdownlint.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@coderabbitai

coderabbitai Bot commented May 20, 2026 •

Copy link
Copy Markdown

Caution

Review failed

Failed to post review comments

📝 Walkthrough

Walkthrough

PR テンプレートを追加し、actionlint・markdownlint・CodeQL・gitleaks の GitHub Actions ワークフローと markdownlint/commitlint 設定を導入、さらに complexity-check と deploy ワークフローの小修正を適用します。

Changes

CI/CD インフラストラクチャセットアップ

Layer / File(s) Summary
PR テンプレートと開発ガイドライン
.github/PULL_REQUEST_TEMPLATE.md
PR 作成時に概要・関連 Issue・変更内容・動作確認・セルフチェック・補足の各セクションを提示する日本語テンプレートを追加。
コード品質リント CI ワークフローと設定
.github/workflows/actionlint.yml, .github/workflows/markdownlint.yml, .markdownlint-cli2.jsonc
actionlint ワークフローを追加。markdownlint ワークフローと .markdownlint-cli2.jsonc を追加し、対象・ルール緩和・除外パターンを設定。
セキュリティ・コード解析ワークフロー
.github/workflows/codeql.yml, .github/workflows/gitleaks.yml
CodeQL(javascript-typescript)ワークフローを追加し init/analyze を構成。gitleaks ワークフローを追加しバイナリ取得・検証・実行・SARIF アップロードを定義。
ワークフロー小修正(複雑度・デプロイ)
.github/workflows/complexity-check.yml, .github/workflows/deploy.yml
complexity-check の step 出力をブロック化してまとめて追記する形式に変更。deploy の aws s3 sync 宛先指定を環境変数補間のクォート付き形式に修正。
commitlint 設定
commitlint.config.cjs
@commitlint/config-conventional を継承する設定を追加し、ヘッダー長・scope/件名のケース・本文行長等を指定するエクスポートを追加。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PRのタイトルは「ci: 🤖 品質向上ワークフローを導入」で、GitHub ActionsワークフローとPRテンプレート、設定ファイルの追加による品質向上施策を適切に説明しており、変更内容の主要な目的を反映しています。
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/quality-tooling

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

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

このプルリクエストでは、GitHubのPRテンプレートの追加と、markdownlintの設定ファイル(.markdownlint-cli2.jsonc)の導入が行われました。レビューでは、PRテンプレート内の箇条書きプレースホルダーの削減、存在しないルール(MD060)の削除、および無視設定(ignores)における冗長なパス指定の整理が提案されています。

Comment thread .github/PULL_REQUEST_TEMPLATE.md Outdated
Comment thread .markdownlint-cli2.jsonc
Comment thread .markdownlint-cli2.jsonc Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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/actionlint.yml:
- Line 27: The checkout step currently uses actions/checkout (the step with
"uses: actions/checkout@...") without disabling credential persistence; update
that step to set persist-credentials: false as an option (add the "with:" block
and include persist-credentials: false) so the runner does not retain the
GITHUB_TOKEN between steps since this workflow does not perform pushes.

In @.github/workflows/gitleaks.yml:
- Around line 32-39: ダウンロード後に gitleaks バイナリの完全性を検証していないので、GITLEAKS_VERSION を使して
curl で取得した "gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" の横に対応する checksum(例:
.sha256 / .sha256sum)を curl でダウンロードし、sha256sum 等で検証してから tar -xzf で展開・sudo mv
するように変更してください; チェックサム検証に失敗した場合は即座にエラーで終了し、gitleaks version
を実行するのは検証とインストールが成功した後に行うようにしてください(参照箇所: GITLEAKS_VERSION, curl
"gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz", tar -xzf
"gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz", sudo mv gitleaks, gitleaks
version)。
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: df5c0f26-2c3a-443f-b42f-70e5c6507ead

📥 Commits

Reviewing files that changed from the base of the PR and between 3f66ce6 and edd76b1.

📒 Files selected for processing (6)
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/workflows/actionlint.yml
  • .github/workflows/codeql.yml
  • .github/workflows/gitleaks.yml
  • .github/workflows/markdownlint.yml
  • .markdownlint-cli2.jsonc

Comment thread .github/workflows/actionlint.yml
Comment thread .github/workflows/gitleaks.yml
genzouw added 4 commits May 20, 2026 12:17
git push操作を行わないワークフローでのトークン永続化リスクを排除。

レビューコメント: #30 (comment)
レビュアー: coderabbitai
優先度: high
改ざん検知のためにchecksumファイルをダウンロードしてsha256sumで
検証してから展開するよう修正。actionlint.ymlと同様のセキュリティ方針に統一。

レビューコメント: #30 (comment)
レビュアー: coderabbitai
優先度: medium
空の項目を残さないよう変更内容セクションのプレースホルダーを
2つから1つに削減。

レビューコメント: #30 (comment)
レビュアー: gemini-code-assist
優先度: low
complexity-check.ymlとdeploy.ymlのシェルスクリプト内でクォートなし変数展開を修正
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 20, 2026
genzouw added 2 commits May 20, 2026 12:54
`**/<dir>/**` パターンはルート直下の `<dir>/**` にもマッチするため、
個別の `node_modules/**`, `dist/**`, `build/**` エントリは冗長だった。
ローカルでパターン解決を実機確認した上で削除し、設定をシンプル化。

レビューコメント: #30 (comment)
レビュアー: gemini-code-assist
優先度: low
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 20, 2026
@genzouw
genzouw enabled auto-merge (squash) May 20, 2026 04:27
@genzouw
genzouw disabled auto-merge May 20, 2026 04:31
@genzouw
genzouw enabled auto-merge (squash) May 20, 2026 04:31
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.

2 participants