I already have a large codebase where we regularly perform pull requests (PRs). What’s the simplest way to ask Cursor how to review a PR in the context of the main branch? Would it be sufficient to just copy and paste the changes exported from Git or is there a cleaner way?
I was looking for the same thing and was bout to build a pipeline for PR review, but that is actually not necessary. In Cursor Chat, you can use @PR to reference it and add some instructions that serve your needs.
Here’s how I do it:
@PR (Diff with Main Branch)
Please analyze the code changes and provide the following information:
1. **Intent and Purpose**: Summarize the goal of the changes. Explain what functionality or behavior the changes aim to introduce, modify, or fix.
2. **Potential Issues**: Identify any possible problems the changes might introduce, such as:
- Bugs or unintended side effects.
- Performance concerns.
- Code quality issues (e.g., readability, maintainability, scalability).
- Violations of best practices or standards.
3. **Suggestions for Improvement**: Recommend any improvements or alternative approaches that could enhance the code.
@Spark how can I find out more about @PR
@codekiln What do you need to know? @PR (Diff with Main Branch) is simply adding the git diff as your reference. You can achieve the same thing by streaming your diff into a file an use this as a reference for cursor. This way you can even compare to other branches than your master.
git diff origin/master > diff.txt
Hi there, @PR is great but could be great instead to have the possibility to analyze remote PR opened by someone else that are not pointing to the main branch. Do you see feasible?