Sentry Prevent AI
Get code reviews and new tests for better code and coverage using Sentry Prevent AI.
Sentry Prevent AI is a generative AI assistant developed by Sentry. It helps you generate new tests for uncovered code and reviews your code changes, offering suggestions for improvement before merging pull requests.
Sentry Prevent AI is currently in beta. Beta features are still a work in progress and may have bugs. Please join the Discord conversation to share your feedback.
To enable Sentry Prevent AI in your GitHub organization or on specific repositories, you need to install the Seer by Sentry app. This allows the assistant to analyze pull requests, provide insights, and write tests.
If you're not an admin, copy the Sentry Prevent AI GitHub App Integration link and share it with your organization's admin or owner to install it.
After installing the app, use these commands in your pull request comments:
@sentry review
- The assistant will review the PR and make suggestions.@sentry generate-test
- The assistant will generate tests for your PR.
Once you have added a comment, the assistant will reply, acknowledging the request. For code reviews, you will then see comments added to your PR. For test generation, you will see a comment with a link to the generated tests.
Sentry Prevent requires access to your pull requests, including:
- PR metadata
- Repository information
- File names
- Directory structures
- Code diffs
The following are sent to the AI provider for analysis:
- File names
- Code diffs
- PR descriptions
No — Sentry Prevent AI only runs on GitHub, and only when explicitly triggered by a comment.
The "Show Generative AI Features" toggle does not currently apply to Sentry Prevent AI. If you don't want Sentry Prevent AI to run on your projects, you can uninstall the Seer GitHub app at any time.
Learn more about AI privacy and security.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").