Pull Request Feedback

This is a paid feature. Please contact us on Discord or subscribe to use it.

Grit-generated pull requests are not static: you can interact with them like any other pull request. You can comment on them, request changes, and approve them. Grit will update the pull request as you interact with it.

Natural language feedback

Grit will respond to any PR comment you prefix with @gritagent. Feedback can be provided at three levels of granularity:

  1. Line-level comments will only impact the line they are on and will not automatically be applied to other lines.
  2. File-level comments will impact the entire file.
  3. PR-level comments (and reviews) will impact the entire pull request.

See an example of different comments here and Grit's changes here.

Commands

In additional to the natural language feedback, Grit also supports precise slash commands to take specific actions.

/grit rebase

Rebase the pull request onto the base branch. Grit will automatically attempt to resolve any merge conflicts and push the changes to the pull request.

Limitations

Grit does not aim for real-time feedback. This is because all code modifications are done in ephemeral environments and tested before being committed. Instead, Grit batches up feedback and revised commits might take a few hours to appear.

Once Grit has finished processing the feedback, it will post a comment on the pull request confirming it has incorporated the feedback and should be ready for another review.

Tips

  • Grit works best if you batch up your feedback and provide it all at once. You should typically provide a full review, then come back to re-review Grit has incorporated your feedback. Treat Grit more like a coworker than a robot.
  • Try to be precise with your feedback. Grit has context from other files, but significantly benefits from precise code suggestions.
  • Grit will automatically make changes to other parts of the code if necessary. For example, if you request a change to a function signature, Grit will update all calls to that function—you don't need to request changes to each call site.
  • Keep in mind that many of the changes Grit makes are required to ensure static analysis and unit tests pass. If you don't like a change Grit made, it is often helpful to suggest an alternative resolution.
  • It is fine to check out the pull request locally and make your own changes. Grit will seamlessly incorporate your changes and will never overwrite your work.