Description
Description
I was testing the sync on commit feature implemented in #19411, and noticed that it was acting strangely.
I tried to add a mirror and checked the new "Sync when commits are pushed" checkbox. The mirror was added, and was able to synchronize when I pressed the "Synchronize Now" button. However, when I pushed a commit, it didn't synchronize.
This prompted me to look in the database and see if the sync_on_commit
field was properly set. I noticed that it was in fact set to false
, despite me checking the checkbox. I tried adding mirrors with the box checked and unchecked. In both cases, sync_on_commit
was set to false
. The mirror only started syncing on commit when I manually set the field to true
.
Another issue I noticed is that all existing push mirrors that were there before switching to the dev version had sync_on_commit
set to true
. This is a problem because not everyone wants to sync their mirrors on commit.
try.gitea.io repos used to reproduce this:
https://try.gitea.io/Arsen6331/Test
mirrored to:
https://try.gitea.io/Arsen6331/Test2
Gitea Version
1.18.0+dev-478-g08609d439
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Gitea is run by the Nomad orchestrator using Docker with the gitea/gitea:dev
container. It is running behind a Traefik reverse proxy.
Database
SQLite