Skip to content
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

Action for asking ChatGPT to review PRs (OSOE-499) #148

Closed
5 tasks
Piedone opened this issue Dec 16, 2022 · 4 comments
Closed
5 tasks

Action for asking ChatGPT to review PRs (OSOE-499) #148

Piedone opened this issue Dec 16, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@Piedone
Copy link
Member

Piedone commented Dec 16, 2022

Let's create a proof of concept that integrates with ChatGPT and asks it to review the PR. This could run specific prompts for each code file, perhaps for the whole file or just the diff like this:

MicrosoftTeams-image

Or:

MicrosoftTeams-image (1)

Now, this would be experimental, and ChatGPT can provide useless or incorrect suggestions too (there are examples of both above). But, it's interesting to see if it makes sense to use for this.

  • Figure out which prompts actually make sense. These might depend on the language of the code file and other parameters. Some more ones for inspiration: "Improve the performance of this code", "Simplify this code", "Write unit test cases for this code", "Write documentation for this code". Also see this thread for some tips.
  • See if you can add context for ChatGPT for it to provide better feedback.
  • Check whether feeding it the whole code file or just the changed section would make sense. Note just the changed section might be too small for it to make sense alone.
  • Implement this in a new action, that's called by a new reusable workflow.
  • Run it for OSOCE PRs, but for now, only in an opt-in way, when the "ask-chatgpt-for-feedback" label is present. It should be triggered on pushes to PRs as well as during labeling (so when you add the label after a push, it'll run too).

Jira issue

@Piedone Piedone added the enhancement New feature or request label Dec 16, 2022
@github-actions github-actions bot changed the title Action for asking ChatGPT to review PRs Action for asking ChatGPT to review PRs (OSOE-499) Dec 16, 2022
@I3undy
Copy link
Member

I3undy commented Jan 17, 2023

As an initial thought, I signed up the for the API and the premium waitlists because there are more outages than normal operations this week.

@Piedone
Copy link
Member Author

Piedone commented Jan 18, 2023

@Piedone
Copy link
Member Author

Piedone commented Mar 14, 2023

This service is for the same goal. We can check it out whether it makes sense to use it, or at least as an inspiration. I signed up for the waitlist.

@Piedone
Copy link
Member Author

Piedone commented Dec 30, 2023

CodeRabbit does this, I'm testing it under Lombiq/Open-Source-Orchard-Core-Extensions#655.

@Piedone Piedone closed this as completed Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants