Description
This is a really cool idea Levi! @kxxt. I've been really impressed by the ingenuity of all the awesome ways people are implementing ChatGPT.
One thing I thought while reading this project. Instead of just asking it to tell you what you did wrong, why stop there? We can also ask it to rewrite the code without the mistake and commit those changes to the PR.
For example, in #12, ChatGPT points out the errors made in this comment. You can also go a step further and ask it to rewrite that file with those errors fixed.
"if there are any errors in this file, rewrite this file without errors"
Then extract the code snippet and commit it.
There's some resources that show how to push commits in a Github Action
If people don't want to give the bot full commit access, they can start by just allowing it to suggest changes. A tool like action-suggester could be used.
Imagine a workflow where:
- Human writes some code
- Chat GPT summarizes changes and gives feedback
- ChatGPT adds recommendations as a suggested change or commits changes directly to branch/PR.