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

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. No migration creates indexes for this collection.

Notes

  • Gitea’s API cannot make commits outside a branch as GitHub’s can. A sync commits straight onto the synced branch when it can move forward, or onto a temporary branch that is then merged through a pull request (GitMerge.mjs:16-21).
  • A sync runs under the gitSync lock of the project, shared with GitHub and GitLab Sync (GitMerge.mjs:25-32).
  • A deleted project keeps its document until the project expires.
  • The user’s Gitea token is in Gitea Sync User Credentials.
Last modified on November 14, 2026