-
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
Conversation
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
1 similar comment
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
MODEL: gpt-3.5-turbo | ||
top_p: 1 | ||
temperature: 0.1 No newline at end of file |
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.
f8f24a6
to
24f07c8
Compare
24f07c8
to
27b5eb2
Compare
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
MODEL: gpt-3.5-turbo | ||
top_p: 1 | ||
temperature: 0.1 No newline at end of file |
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 for performing code reviews using the ChatGPT language model from OpenAI. Here are some observations and suggestions:
- The
name
field is not necessary, but it can be helpful for identifying the workflow in the Actions tab of the repository. - The
permissions
field is not necessary unless you want to restrict access to the workflow. - The
on
field specifies that the workflow should run on pull requests targeting themaster
branch or any branch starting withrelease-
, but ignoring changes to files in thedocs/
directory or any Markdown files. This seems reasonable, but you may want to adjust the branch names depending on your project's branching strategy. - The
jobs
field defines a single job calledcode-review
that runs on an Ubuntu environment. The job consists of a single step that uses theoilbeater/ChatGPT-CodeReview
action to perform the code review. The action requires several environment variables to be set, including the GitHub token and the OpenAI API key. TheMODEL
,top_p
, andtemperature
variables control the behavior of the language model. These values seem reasonable, but you may want to experiment with different settings to see what works best for your project. - There is no newline at the end of the file, which may cause issues with some tools.
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 schedule
or workflow_dispatch
events).
What type of this PR
Examples of user facing changes:
Which issue(s) this PR fixes:
Fixes #(issue-number)