Repository navigation
Description
What/Why
What are you proposing?
LLMs help with many parts of the tedious development work, and they can be used for code reviews as well. This issue proposes the org to add a GitHub apps that leverage AI to automatically go through each pull request diff and leaves comments with potential problems and fixes, and repos that are willing to onboard can use them to help with code reviews.
What users have asked for this feature?
N/A, this is for developers not users.
What problems are you trying to solve?
This helps developers to have automated checks on their PR to catch early issues and speed up code review process.
What is the developer experience going to be?
Developers will send and review pull requests as usual, this does not replace any parts of the process. It only adds additional comments on the PR.
Are there any security considerations?
No, all pull requests are public.
Are there any breaking changes to the API
No
What is the user experience going to be?
No change on user experience
Are there breaking changes to the User Experience?
No change on user experience
Why should it be built? Any reason not to?
It should be built because it should simplify code reviews and improve code quality. It may introduce additional noise or incorrect information due to model and tool limitations, we can disable it if it's not performing well and I think it's worth a try.
What will it take to execute?
Onboarding depends on the solution we use. Most likely we will add some secrets and a GitHub action workflow in repos that are onboarding.
Any remaining open questions?
There are different providers, I prefer the amazon-q-developer app because it's free to try. Here are some I looked into
- https://github.com/apps/amazon-q-developer: preferred as this is free to use for now
- https://docs.github.com/en/copilot/using-github-copilot/code-review/using-copilot-code-review: this requires premium requests with monthly per-person quota
- https://github.com/qodo-ai/pr-agent: this is an open source solution that requires custom API providers
Activity
ashwin-pc commentedon Jun 12, 2025
Thanks for opening this @joshuali925 . I agree that we should atleast give this a try. If anything this might help bring in more community contributions since reviews are not able to keep up with the speed of pull requests being opened
peternied commentedon Jun 12, 2025
@joshuali925 I like the idea of experimenting and I'm curious how you'd like to see this enabled. I believe this can be manually triggered on repos that you've got write permissions. Could you pilot manually exercising this and then let us know how reviewers and maintainers find it useful (or not)?
peternied commentedon Jun 12, 2025
I just ran this tool against a pull request in a repo that I maintain and it was not very useful IMO to either the contributor or the maintainers. I believe this can improve; however I am cautious about enabling a process that could cause contributors to take un-useful advice.
opensearch-project/opensearch-migrations#1578 (review)
cwperks commentedon Jun 12, 2025
FYI I saw another example of its usage in a repo under opensearch-project here: opensearch-project/opensearch-jvector#88
joshuali925 commentedon Jun 12, 2025
In my GitHub Copilot page it says
I don't know if its worth it to purchase this at the org level, so I was proposing to try amazon-q-developer first. I did submit a request to install it for
opensearch-project/OpenSearch-Dashboardsbut seems it requires org admin to install or approve it.peternied commentedon Jun 12, 2025
Running a pilot in OpenSearch-Dashboards makes sense to me if the other maintainers are onboard - what would you think about creating an RFC on that repo and getting some +1's?
I'm not sure what GitHub license we have as OpenSearch-Project - maybe we already have access 🤷♂️.
That said co-pilot is yet to 'wow' me. Trying out Amazon Q could be interesting as a counterpoint.
joshuali925 commentedon Jun 13, 2025
Sounds good, I can try it in my fork first and get some feedback from maintainers. I've previously looked into LLM based vulnerability findings and I agree those are not impressive, but this is a fast evolving space and I think it'd be good to bring it up for discussion.
Is a way to find out? Seems Copilot review can be requested on demand, it wouldn't be that much noise since maintainers can choose when and where to get Copilot code reviews.
joshuali925 commentedon Jun 16, 2025
I couldn't get AmazonQ to work for code reviews yet, will hold a bit on creating the RFC. Currently getting errors in my fork joshuali925/OpenSearch-Dashboards#1, joshuali925/OpenSearch-Dashboards#2created an upstream issue Amazon-Q-Developer/feedback-q-developer-for-github-app#10Edit: created a RFC for Dashboards repo opensearch-project/OpenSearch-Dashboards#9997. AmazonQ is fixed but the result doesn't look very good to me, @peternied if you somehow find out whether we can use Copilot please let me know, I do want to try some alternatives
peternied commentedon Jun 30, 2025
@joshuali925 Thanks for the in-depth look into Amazon Q - to start with co-pilot could you do a similar study by manually assigning it to reviewer on a handful of test case PRs? I've 'enabled it' on a PR I made in dashboards [link] several years ago and would be curious what kind of value you see it providing equal, worse, or better than Amazon Q.
joshuali925 commentedon Jun 30, 2025
@peternied I'm interested in doing this as well, but apparently I don't have access to Copilot code reviews in OpenSearch-Dashboards repo (or any repo)
So thanks for sharing that PR with Copilot review comments.
Based on what it said, seems Copilot also tries to match code against a list of rules, similar to AmazonQ. To me that is more like linting rather than code review. It does provide value but we don't really need a LLM to do it. For example, "prevent word splitting and globbing issues" can be detected reliably using
shellcheck.peternied commentedon Jun 30, 2025
@joshuali925 Good comment around the nature of the review that we seem to be getting. I'm pretty passionate about pull requests in general - I gave a presentation [1] and wrote up a blog [2].
Using an LLM to help an LLM do this better here is what I got from ChatGPT, maybe you could figure out a way to wire this up? Or let me know if we should create a start-up to provide this service 😆
joshuali925 commentedon Oct 2, 2025
@peternied Sorry I got busy with something and lost track of this issue. I've seen similar prompts for code review, we might be too late for start-up :D But thanks for the resources, they are helpful to think about what can be done.
There are some ways to trigger LLM-based code reviews that works similar to your suggestion, like the
/reviewcommand in claude-code. IMO, one problem is that many tools/prompts are git-diff based, and the LLM does not have the whole picture. LLM will definitely miss the problems the PR will introduce but are not visible in the diff.I usually find it to work better if I squash the PR onto main, commit with a detailed message, then ask claude-code something like "Review the code for last git commit. Read relevant files to get context" so it reads relevant files in the repo instead of just the diff.
But while this can be automated, it is expensive. For the purpose of this issue, I think we are just looking for some minimal-effort ways of getting LLM feedback on PRs using existing products. We've got 7 upvotes from maintainers in the OSD repo.
So question to infra team: could we enable AmazonQ app or any other app first on OpenSearch-Dashboards? We can then evaluate its problems/usefulness and think about improvements more comprehensively.
peternied commentedon Oct 3, 2025
@joshuali925 I'd recommend creating a separate fresh ticket for enabling the app for just that repo - I'd love to see the results from active usage. With more data we can fold that info into this more broad enablement.
peterzhuamazon commentedon Nov 20, 2025
Closing this issue as the discussion is moved to #412.
Thanks.