Skip to main content
githubSyncProjectStates holds one document per project that is linked to a GitHub repository: which repository, and where the last sync left off. It belongs to the github-sync web module (services/web/modules/github-sync). The schema is in services/web/modules/github-sync/app/models/githubSyncProjectStates.mjs, and all access goes through services/web/modules/github-sync/app/src/SyncStateManager.mjs.

Fields

Who Writes It

Who Reads It

Indexes

Mongoose autoIndex is off (services/web/app/src/infrastructure/Mongoose.mjs:7), so the schema’s unique: true on projectId creates nothing. tools/migrations/20190912145010_create_githubSyncProjectStates_indexes.mjs (upstream’s project_id and owner_id) is tagged saas only and does not run in CE.

Notes

  • A sync runs under the gitSync lock of the project (GitMerge.mjs:17-24). GitLab and Gitea Sync take the same lock, so only one sync runs per project at a time.
  • A deleted project keeps its document until the project expires.
  • The user’s GitHub token is in GitHub Sync User Credentials.
Last modified on November 14, 2026