Commit Graph

2 Commits

Author SHA1 Message Date
Devin AI 9b9330982a fix: address PR review comments for GitHub integrations
- Make installationId and githubOrgId NOT NULL (required GitHub API fields)
- Change user foreign key to ON DELETE SET NULL to prevent blocking user deletion
- Add index on github_org_id for better query performance
- Maintain unique constraint on organization_id + installation_id pair

Addresses greptile-apps review comments on PR #574

Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
2025-07-21 05:59:39 +00:00
Devin AI 6bc6602028 feat: add GitHub integrations table and migration
- Add githubIntegrationStatusEnum with states: pending, active, suspended, revoked
- Add githubIntegrations table with GitHub App architecture fields:
  - installationId, appId for GitHub App integration
  - githubOrgId, githubOrgName for GitHub organization info
  - tokenVaultKey, webhookSecretVaultKey for secure token storage
  - repositoryPermissions JSONB field for access control
- Add foreign key constraints to organizations and users tables
- Add indexes for organizationId and installationId for query performance
- Add unique constraints for tokenVaultKey and org-installation pairs
- Create migration 0084_github_integrations.sql following Drizzle pattern

Implements BUS-1462: GitHub integrations table for tracking GitHub App integrations

Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
2025-07-21 05:45:51 +00:00