-
Couldn't load subscription status.
- Fork 468
Update openai-review.yml #481
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,39 +1,77 @@ | ||
| name: OpenAI Reviewer | ||
| name: ai-pr-reviewer | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
Comment on lines
3
to
5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Image description CodeRabbit The permissions set for the GitHub Actions workflow are appropriate and follow the principle of least privilege. The |
||
|
|
||
| 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] | ||
|
Comment on lines
7
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Image description CodeRabbit The event triggers have been updated to include -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' }} | ||
|
Comment on lines
18
to
20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Image description CodeRabbit The concurrency settings seem fine. They ensure that only one job runs per PR or comment, which can help prevent race conditions or redundant reviews. |
||
|
|
||
| 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 | ||
|
Comment on lines
22
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Image description CodeRabbit The job setup looks good. It's set to run on |
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| with: | ||
| repository: ${{github.event.pull_request.head.repo.full_name}} | ||
| ref: ${{github.event.pull_request.head.ref}} | ||
| submodules: false | ||
| - uses: ./ | ||
| - 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 | ||
|
Comment on lines
+28
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Image description CodeRabbit The step using |
||
| path_filters: | | ||
| !dist/** | ||
| !db/** | ||
| !**/*.lock | ||
|
Comment on lines
40
to
42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Image description CodeRabbit The path filters exclude database files and lock files from the review. This seems reasonable as these files typically don't need code review. |
||
| system_message: | | ||
| あなたは @coderabbitai(別名 github-actions[bot])で、OpenAIによって訓練された言語モデルです。 | ||
| あなたの目的は、非常に経験豊富なソフトウェアエンジニアとして機能し、コードの一部を徹底的にレビューし、 | ||
| 以下のようなキーエリアを改善するためのコードスニペットを提案することです: | ||
| - ロジック | ||
| - セキュリティ | ||
| - パフォーマンス | ||
| - データ競合 | ||
| - 一貫性 | ||
| - エラー処理 | ||
| - 保守性 | ||
| - モジュール性 | ||
| - 複雑性 | ||
| - 最適化 | ||
| - ベストプラクティス: DRY, SOLID, KISS | ||
| 些細なコードスタイルの問題や、コメント・ドキュメントの欠落についてはコメントしないでください。 | ||
| 重要な問題を特定し、解決して全体的なコード品質を向上させることを目指してくださいが、細かい問題は意図的に無視してください。 | ||
| summarize: | | ||
|
Comment on lines
+44
to
+61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Image description CodeRabbit The system message is written in Japanese and provides a detailed explanation of the bot's purpose and capabilities. This is a good practice for clarity and user understanding. |
||
| 次の内容でmarkdownフォーマットを使用して、最終的な回答を提供してください。 | ||
| - *ウォークスルー*: 特定のファイルではなく、全体の変更に関する高レベルの要約を80語以内で。 | ||
| - *変更点*: ファイルとその要約のテーブル。スペースを節約するために、同様の変更を持つファイルを1行にまとめることができます。 | ||
| GitHubのプルリクエストにコメントとして追加されるこの要約には、追加のコメントを避けてください。 | ||
| summarize_release_notes: | | ||
| このプルリクエストのために、その目的とユーザーストーリーに焦点を当てて、markdownフォーマットで簡潔なリリースノートを作成してください。 | ||
| 変更は次のように分類し箇条書きにすること: | ||
| "New Feature", "Bug fix", "Documentation", "Refactor", "Style", | ||
| "Test", "Chore", "Revert" | ||
| 例えば: | ||
| ``` | ||
| - New Feature: UIに統合ページが追加されました | ||
| ``` | ||
| 回答は50-100語以内にしてください。この回答はそのままリリースノートに使用されるので、追加のコメントは避けてください。 | ||
|
Comment on lines
+62
to
+77
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Image description CodeRabbit The |
||