-
Notifications
You must be signed in to change notification settings - Fork 299
Conversation
WalkthroughThe changeset introduces significant updates to the GitHub Actions workflow, enhancing its functionality and versatility. It adds new event triggers, modifies job steps, and introduces a feature to summarize release notes. The workflow is now more responsive and informative, providing system messages for reviewers and supporting comments in Japanese. Changes
Uplevel your code reviews with CodeRabbit ProCodeRabbit ProIf 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files selected (1)
- .github/workflows/openai-review.yml (1)
Review comments generated (8)
- Review: 8
- LGTM: 0
Tips
Chat with 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.
permissions: | ||
contents: read | ||
pull-requests: write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on: | ||
pull_request_target: | ||
types: [opened, synchronize, reopened] | ||
pull_request: | ||
types: [opened] | ||
branches-ignore: | ||
- master | ||
- main | ||
pull_request_review_comment: | ||
types: [created] | ||
issue_comment: | ||
types: [created] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The event triggers have been updated to include pull_request
with type opened
, and issue_comment
with type created
. However, the pull_request_review_comment
trigger is not correctly indented under the on:
key. This could lead to unexpected behavior or errors when the workflow is triggered.
-13: pull_request_review_comment:
+13: pull_request_review_comment:
concurrency: | ||
group: | ||
${{ github.repository }}-${{ github.event.number || github.head_ref || | ||
github.sha }}-${{ github.workflow }}-${{ github.event_name == | ||
'pull_request_review_comment' && 'pr_comment' || 'pr' }} | ||
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}-${{ github.event_name == 'pull_request_review_comment' && 'pr_comment' || 'pr' }} | ||
cancel-in-progress: ${{ github.event_name != 'pull_request_review_comment' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jobs: | ||
review: | ||
runs-on: ubuntu-latest | ||
if: (github.event_name == 'issue_comment' && contains(github.event.comment.body, '[run review]') && github.event.issue.pull_request) || (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '[run review]')) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.title, 'release') && !contains(github.event.pull_request.title, 'Release')) | ||
timeout-minutes: 15 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- uses: coderabbitai/openai-pr-reviewer@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
with: | ||
debug: true | ||
debug: false | ||
review_simple_changes: false | ||
review_comment_lgtm: false | ||
openai_heavy_model: gpt-4 | ||
openai_light_model: gpt-4 # 好みで変更 | ||
openai_heavy_model: gpt-4 # 好みで変更 | ||
openai_timeout_ms: 900000 # 15分. | ||
language: ja-JP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The step using coderabbitai/openai-pr-reviewer@latest
is configured with environment variables for GITHUB_TOKEN
and OPENAI_API_KEY
. The with:
parameters seem reasonable, although debug: false
might limit troubleshooting if issues arise. The language model used is gpt-4
, which should provide high-quality reviews. The language is set to Japanese (ja-JP
), which matches the comments in the file.
path_filters: | | ||
!dist/** | ||
!db/** | ||
!**/*.lock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あなたは @coderabbitai(別名 github-actions[bot])で、OpenAIによって訓練された言語モデルです。 | ||
あなたの目的は、非常に経験豊富なソフトウェアエンジニアとして機能し、コードの一部を徹底的にレビューし、 | ||
以下のようなキーエリアを改善するためのコードスニペットを提案することです: | ||
- ロジック | ||
- セキュリティ | ||
- パフォーマンス | ||
- データ競合 | ||
- 一貫性 | ||
- エラー処理 | ||
- 保守性 | ||
- モジュール性 | ||
- 複雑性 | ||
- 最適化 | ||
- ベストプラクティス: DRY, SOLID, KISS | ||
|
||
些細なコードスタイルの問題や、コメント・ドキュメントの欠落についてはコメントしないでください。 | ||
重要な問題を特定し、解決して全体的なコード品質を向上させることを目指してくださいが、細かい問題は意図的に無視してください。 | ||
summarize: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
次の内容でmarkdownフォーマットを使用して、最終的な回答を提供してください。 | ||
|
||
- *ウォークスルー*: 特定のファイルではなく、全体の変更に関する高レベルの要約を80語以内で。 | ||
- *変更点*: ファイルとその要約のテーブル。スペースを節約するために、同様の変更を持つファイルを1行にまとめることができます。 | ||
|
||
GitHubのプルリクエストにコメントとして追加されるこの要約には、追加のコメントを避けてください。 | ||
summarize_release_notes: | | ||
このプルリクエストのために、その目的とユーザーストーリーに焦点を当てて、markdownフォーマットで簡潔なリリースノートを作成してください。 | ||
変更は次のように分類し箇条書きにすること: | ||
"New Feature", "Bug fix", "Documentation", "Refactor", "Style", | ||
"Test", "Chore", "Revert" | ||
例えば: | ||
``` | ||
- New Feature: UIに統合ページが追加されました | ||
``` | ||
回答は50-100語以内にしてください。この回答はそのままリリースノートに使用されるので、追加のコメントは避けてください。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary by CodeRabbit