PR-Pilot-AI / pr-pilot

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
https://www.pr-pilot.ai
GNU General Public License v3.0
148 stars 15 forks source link

✨ Add Sentry Integration to PR Pilot #196

Closed pr-pilot-ai[bot] closed 2 months ago

pr-pilot-ai[bot] commented 2 months ago

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

  1. 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.
  2. 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.
  3. 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

  1. Go to the integrations page in the dashboard.
  2. Enter a valid Sentry API key and save it.
  3. Verify that the key is saved and that PR Pilot can query Sentry issues and events.
  4. Delete the Sentry API key and ensure it is removed from the user's profile.

Related Issues

Notes