-
Notifications
You must be signed in to change notification settings - Fork 2
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
github action #2
Conversation
OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }} | ||
OWNER: ${{ github.repository_owner }} | ||
REPO: ${{ github.event.repository.name }} | ||
PR_NUMBER: ${{ github.event.number }} |
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.
Overall, the code patch looks good. Here are some suggestions:
- In the "Set up Go" step, it might be helpful to specify a more specific Go version instead of using "1.19", which could become outdated.
- Instead of hardcoding the repository owner and name in the "Checkout GPT-PullRequest-Updater" step, consider using the predefined "github" context variables. For example, you can use "github.repository_owner" and "github.event.repository.name" to get the owner and name of the repository where the pull request was opened/synchronized.
- In the "Update Pull Request Description" and "Review Pull Request" steps, it might be a good idea to add some error handling and logging to make troubleshooting easier if something goes wrong.
- Consider adding some comments to explain what each step does and why it's needed. This can be helpful for other contributors who might not be familiar with the codebase.
|
||
License | ||
This project is licensed under the MIT License. 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.
The code patch adds a tool for updating and reviewing GitHub pull requests. The commands review
and description
are used to review pull requests and update the pull request description, respectively. The code also includes a GitHub action that can automatically run the review
and description
commands when a pull request is opened or synchronized.
The review
and description
commands require environment variables to be set, and the GitHub action uses secrets to access the necessary tokens. Test mode can be enabled by adding the --test
flag.
Improvement suggestions:
- Provide more detailed documentation on how to set the necessary environment variables and secrets.
- Add error handling and logging to provide more informative error messages when there are issues.
- Consider using a more descriptive name for the GitHub action workflow, to make it clear what it does.
Description
This pull request adds two new GitHub Actions to the repository: ChatGPT Code Review and GPT Pull Request Updater. The ChatGPT Code Review action is triggered on opened, reopened, and synchronization of pull requests events, and it requires permissions to read contents and write pull requests. The action runs on Ubuntu latest version platform and needs GITHUB_TOKEN and OPENAI_API_KEY secrets to be executed.
The GPT Pull Request Updater action includes a Go version 1.19 and is triggered to run on pull request creation and synchronization events. The workflow checks out the GPT-PullRequest-Updater repository, builds the description and review commands, and updates the pull request description and reviews using GitHub and OpenAI tokens, the repository owner, and the pull request number.
Changes