-
Notifications
You must be signed in to change notification settings - Fork 458
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
ci: add openai to review the code #2511
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Code Review | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- release-* | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**.md' | ||
|
||
jobs: | ||
code-review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: oilbeater/ChatGPT-CodeReview@main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
MODEL: gpt-3.5-turbo | ||
top_p: 1 | ||
temperature: 0.1 | ||
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. This code patch appears to be a GitHub Actions workflow file for performing code reviews using the ChatGPT language model from OpenAI. Here are some observations and suggestions:
Overall, this code patch looks reasonable, but it's hard to say for sure without knowing more about the project and its requirements. Some potential improvements might include adding additional steps to the job (e.g., running linters or other static analysis tools), customizing the behavior of the ChatGPT action (e.g., by passing additional arguments), or adding more granular control over when the workflow runs (e.g., by using the |
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.
This code patch appears to be a GitHub Actions workflow file that triggers on pull request events and runs a job named "test" on an Ubuntu environment. The job uses the oilbeater/ChatGPT-CodeReview action, which likely performs some kind of code review using OpenAI's GPT-3 language model.
As for potential improvements, it would be helpful to include more information in the name field of the workflow file, such as the repository or project name. Additionally, it may be useful to add more steps to the job, such as running tests or linters, before invoking the code review action. Finally, it's worth noting that the use of third-party actions like oilbeater/ChatGPT-CodeReview carries some risk, so it's important to thoroughly vet any external dependencies before including them in a workflow.