Skip to content
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

Test commit #75

Merged
merged 6 commits into from
Jul 23, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/biome.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Biome Check and Fix

on:
pull_request:

jobs:
biome:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: cd web && bun i

Choose a reason for hiding this comment

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

Image description CodeRabbit

依存関係のインストールに失敗した場合のエラーハンドリングが不足しています。bun i コマンドの後にエラーチェックを追加してください。

-         run: cd web && bun i
+         run: |
+           cd web
+           if ! bun i; then
+             echo "Dependency installation failed"
+             exit 1
+           fi

- name: Run Biome check and fix
run: |
cd web
bunx @biomejs/biome check --apply .

Choose a reason for hiding this comment

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

Image description CodeRabbit

Biomeチェックと修正を行うコマンドが間違っています。正しいコマンドは以下の通りです。

-           bunx @biomejs/biome check --apply .
+           bun biome check --apply .

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "style: apply Biome fixes"
file_pattern: 'web/**/*'

Choose a reason for hiding this comment

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

Image description CodeRabbit

ファイルパターンの指定が広すぎます。特定のファイルタイプに絞ることで、不要なコミットを防ぐことができます。

-           file_pattern: 'web/**/*'
+           file_pattern: 'web/**/*.js'

Loading