How to deactivate the mirroring of a repository with the api

Hello, following a migration I cloned all my repositories from an old Gitea to the new one with the api. Each of these repo are mirrored with its counterpart on the old Gitea.
I would now like to remove this link via the api to avoid doing 200 times the action with the interface.
There is the PATCH /{owner}/{repo} route to change the repository properties, but there is only the possibility to change the sync frequency.
Is there a solution to my problem?

Thanks for your help.

Unfortunately, I don’t think there is a currently solution to your problem besides manually crafting an SQL query to do this. If you check the code for the EditRepoOption model which is what the API decodes and uses, there isn’t really any way to disable it.

As a workaround, you could modify the sync frequency to be some absurdly large number to prevent unnecessary pulls and file a feature request on GitHub for this and then wait for it to be added.

1 Like

Ok, thank you very much for your answer.