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 SentryIntegration model and update PilotUser #179

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

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

Sub-task 1/4 is complete.

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

The following tests failed:

The errors are caused by the missing accounts_sentryintegration table. This is due to the addition of the SentryIntegration model in the PR. Here are the relevant code changes:

class SentryIntegration(models.Model):
    api_key = models.TextField(null=True, blank=False)

class PilotUser(AbstractUser):
    linear_integration = models.OneToOneField(
        LinearIntegration, on_delete=models.CASCADE, null=True, blank=True
    )
    slack_integration = models.OneToOneField(
        SlackIntegration, on_delete=models.CASCADE, null=True, blank=True
    )
    sentry_integration = models.OneToOneField(
        SentryIntegration, on_delete=models.CASCADE, null=True, blank=True
    )

To fix the issue, you need to create and apply a new database migration for the SentryIntegration model. You can do this by running the following commands:

python manage.py makemigrations
python manage.py migrate

This will create the necessary database table and resolve the test errors.