Skip to content

Conversation

@mbani01
Copy link
Contributor

@mbani01 mbani01 commented Dec 25, 2025

This pull request introduces two new database tables to support repository management and processing workflows. The changes add a repositories table for tracking repository metadata and a repositoryProcessing table for managing the state and processing of repositories, including onboarding and recurrent processing. Both tables include relevant indexes to optimize queries for common operations.

Repository metadata and management:

  • Added the repositories table in the public schema to store repository details such as URL, integration references, project association, archival status, and timestamps. Also added several indexes to improve query performance, especially for active (non-deleted) repositories.

Repository processing workflow:

  • Added the repositoryProcessing table in the git schema to track the processing state of repositories, including fields for processing state, priority, locking, last processed commit, and re-onboarding status. Created multiple indexes to optimize acquisition and counting of processing tasks based on state and locking.

Note

Introduces two DB migrations to support repository metadata and processing workflows.

  • Creates public.repositories with URL, integration and project refs, status flags (archived, excluded), timestamps, and optional forkedFrom/lastArchivedCheckAt; adds indexes on segmentId, sourceIntegrationId, and insightsProjectId (filtered to non-deleted)
  • Adds git."repositoryProcessing" to track per-repo processing state (state, priority, lockedAt, lastProcessedAt/Commit, maintainer fields, re-onboarding flags/counters) with unique repositoryId; includes acquisition/counting indexes for pending/unlocked, recurrent, and active onboarding tasks

Written by Cursor Bugbot for commit 74e90ad. This will update automatically on new commits. Configure here.

@mbani01 mbani01 self-assigned this Dec 25, 2025
@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

1 similar comment
@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@mbani01 mbani01 changed the title feat: init new standard repositories tables feat: init new standard repositories tables [CM-864] Dec 25, 2025
@mbani01 mbani01 merged commit e43b410 into main Dec 25, 2025
15 checks passed
@mbani01 mbani01 deleted the feat/standardize_repositories_tables branch December 25, 2025 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants