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

Test commit #75

merged 6 commits into from
Jul 23, 2024

Conversation

ttizze
Copy link
Owner

@ttizze ttizze commented Jul 23, 2024

Summary by CodeRabbit

## リリースノート

### Chore
- 新機能: GitHub Actions ワークフローを追加し、`web` ディレクトリ内のファイルに対して Biome チェックと修正を自動的に実行するようにしました。プルリクエストが作成された際に、Node.js 20をセットアップし、Bun をインストールして依存関係を解決し、Biome チェックと修正を行い、その結果を自動コミットします。

Copy link

github-actions bot commented Jul 23, 2024

Image description CodeRabbit

- **ウォークスルー**: この変更は、GitHub Actions ワークフローを追加し、`web` ディレクトリ内のファイルに対して Biome チェックと修正を自動的に実行するものです。プルリクエストが作成された際に、Node.js 20をセットアップし、Bun をインストールして依存関係を解決し、Biome チェックと修正を行い、その結果を自動コミットします。

- **変更点**:
  | ファイル | 要約 |
  | --- | --- |
  | .github/workflows/biome.yaml | GitHub Actions ワークフローを追加し、`web` ディレクトリ内のファイルに対して Biome チェックと修正を自動的に実行 |

Uplevel your code reviews with CodeRabbit Pro

CodeRabbit Pro

If you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 906f938 and 1f6bba8 commits.
Files selected (1)
  • .github/workflows/biome.yaml (1)
Review comments generated (3)
  • Review: 1
  • LGTM: 2

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 1f6bba8 and 4332dfa commits.
Files selected (1)
  • .github/workflows/biome.yaml (1)
Review comments generated (2)
  • Review: 2
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 4332dfa and a318871 commits.
Files selected (1)
  • .github/workflows/biome.yaml (1)
Review comments generated (3)
  • Review: 3
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

- 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 .

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'

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between a318871 and 531b17b commits.
Files selected (1)
  • .github/workflows/biome.yaml (1)
Review comments generated (4)
  • Review: 3
  • LGTM: 1

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

with:
node-version: '20'
- name: Install Bun
run: npm install -g bun

Choose a reason for hiding this comment

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

Image description CodeRabbit

npm install -g bun はセキュリティ上のリスクがあるため、特定のバージョンをインストールすることをお勧めします。

-         run: npm install -g bun
+         run: npm install -g bun@latest

- name: Install Bun
run: npm install -g bun
- 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 --write .

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 --write . コマンドの後にエラーチェックを追加してください。

-           bunx @biomejs/biome check --write .
+           if ! bunx @biomejs/biome check --write .; then
+             echo "Biome check and fix failed"
+             exit 1
+           fi

@ttizze ttizze merged commit 3e47af7 into main Jul 23, 2024
4 checks passed
@ttizze ttizze deleted the feature/lefthook branch July 23, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant