An AI agent for your development workflow that can search and manipulate the code base, browse the internet and interact with Github issues and pull requests
This PR introduces a new Sentry integration to PR Pilot. Users can now enter their Sentry API key in the dashboard, allowing PR Pilot to interact with the Sentry API to search for issues and events.
Changes Made
Model Changes
Added SentryIntegration model to accounts/models.py to store the Sentry API key.
Created a new issue #195 to add a migration for the new model.
Dashboard Integration
Updated dashboard/templates/integrations/sentry.html to include a form for the API key and a delete button if an API key is already stored.
Updated IntegrationView class in dashboard/views/integrations.py to handle the Sentry API key form submission and deletion.
Agent Tools
Implemented Sentry agent tools in engine/agents/integration_tools/sentry_tools.py.
Wrote unit tests for the new tools in engine/agents/tests/test_sentry_tools.py.
Updated engine/agents/integration_tools/__init__.py to register the new tools.
Purpose
The Sentry integration allows PR Pilot to leverage Sentry's API to provide users with insights into their application's issues and events directly from the PR Pilot dashboard. This enhances the capabilities of PR Pilot, making it a more powerful tool for developers.
How to Test
Go to the integrations page in the dashboard.
Enter a valid Sentry API key and save it.
Verify that the key is saved and that PR Pilot can query Sentry issues and events.
Delete the Sentry API key and ensure it is removed from the user's profile.
Related Issues
Issue #195: Add migration for SentryIntegration model.
Notes
Ensure that the Sentry API key is kept secure and not exposed in logs or error messages.
The integration tools use the Sentry API to fetch issues and events based on user queries.
Summary
This PR introduces a new Sentry integration to PR Pilot. Users can now enter their Sentry API key in the dashboard, allowing PR Pilot to interact with the Sentry API to search for issues and events.
Changes Made
Model Changes
SentryIntegration
model toaccounts/models.py
to store the Sentry API key.Dashboard Integration
dashboard/templates/integrations/sentry.html
to include a form for the API key and a delete button if an API key is already stored.IntegrationView
class indashboard/views/integrations.py
to handle the Sentry API key form submission and deletion.Agent Tools
engine/agents/integration_tools/sentry_tools.py
.engine/agents/tests/test_sentry_tools.py
.engine/agents/integration_tools/__init__.py
to register the new tools.Purpose
The Sentry integration allows PR Pilot to leverage Sentry's API to provide users with insights into their application's issues and events directly from the PR Pilot dashboard. This enhances the capabilities of PR Pilot, making it a more powerful tool for developers.
How to Test
Related Issues
SentryIntegration
model.Notes