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

bug: createSuggestions function #55

Open
ilteoood opened this issue Apr 22, 2023 · 2 comments
Open

bug: createSuggestions function #55

ilteoood opened this issue Apr 22, 2023 · 2 comments
Assignees

Comments

@ilteoood
Copy link
Contributor

Looking at the code of the createSuggestions function, we are always overwriting the content of the suggestionsForFile variable, keeping only its last value.

Is this behaviour correct?
If it's correct, we could avoid iterating the transformerResponse array and take only the last entry.
Otherwise, the forEach function should became a map to keep all the possible results.

P.S. I also asked an opinion to ChatGPT 😄
image

@richiemccoll
Copy link
Contributor

richiemccoll commented Apr 24, 2023

Thanks for raising @ilteoood. IIRC this was an intentional omission on my part. During the MVP, I created this TODO to track adding support for multiple suggestions on individual files. The snippet from GPT might work yes. Although it would need tested with the GitHub createReview API.

@simoneb
Copy link
Member

simoneb commented May 3, 2023

I'd park this for the time being. The idea behind this project was mostly to serve as a showcase for something that can be built with Node.js and ChatGPT, but not serve as a real product.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants