feat(repos): Track last_sync on OrganizationIntegration config#113686
Conversation
a314b4c to
7f1f004
Compare
| repos_added=repos_added, | ||
| repos_removed=repos_removed, | ||
| ) | ||
| bump_oi_last_sync(oi.id) |
There was a problem hiding this comment.
Let's call this bump_org_integration_last_sync
| if dry_run: | ||
| return | ||
|
|
||
| bump_oi_last_sync(organization_integration_id) |
There was a problem hiding this comment.
Should we only bump this if things actually change? Or do we want to know the last time we attempted a sync regardless?
There was a problem hiding this comment.
I think it's probably a good idea to just know the last time we synced. idk though maybe it is more useful to know the last time something actually "changed'. hmm, we could store both?
There was a problem hiding this comment.
Yeah, maybe both are useful. I don't feel too strongly either way though
There was a problem hiding this comment.
I've added both here
7f1f004 to
d023e5b
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d023e5b. Configure here.
d023e5b to
26d77b7
Compare
Stamp `OrganizationIntegration.config["last_sync"]` after each run of the SCM sync cron and each time the GitHub `installation_repositories` webhook processes an OI. Stored as an ISO-8601 string so the existing `configData` serializer exposes it to the frontend without schema changes. This will back a "Last synced X ago" indicator in the repository settings UI.
26d77b7 to
1577771
Compare

Stamp
OrganizationIntegration.config["last_sync"]after each run ofthe SCM sync cron and each time the GitHub
installation_repositorieswebhook processes an OI. Stored as an ISO-8601 string so the existing
configDataserializer exposes it to the frontend without schemachanges.
This will back a "Last synced X ago" indicator in the repository
settings UI.