-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
RepoEdit via API fails with "repo is not a mirror, can not change mirror interval" #30921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This comment was marked as outdated.
This comment was marked as outdated.
Have you set If neither MirrorInterval nor EnablePrune is set, then I guess API won't report the error? |
I have to dig some more. Hand crafted request via swagger Gui runs fine:
Existing C# code, which is calling gitea via openApi generated c# client fails:
|
quick check: openApi did not generate different code for class
Executing method |
Hmm yes, the problem is that Maybe it could be fixed by fine-tuning the logic again. |
maybe make |
Actually, the
I think we can do this on Gitea side: " Simplify mirror repository API logic #30963 " and have simpler code. |
Backport #30963 by wxiaoguang Fix #30921 Co-authored-by: wxiaoguang <[email protected]>
1.22 nightly is ready, could you try it? https://dl.gitea.com/gitea/1.22/ or by docker "1.22-nightly" |
works in the just released Gitea 1.22. |
Fix go-gitea#30921 (cherry picked from commit 821d2fc) (cherry picked from commit 50b4e7f) Equivalent to the Gitea v1.22 commit (cherry picked from commit 8eac16d)
Description
When editing a repo with the GiteaAPI we get this error:
when calling
RepoEditAsync
with some options andEditRepoOption { MirrorInterval=null }
which should do nothing to the mirror interval, as stated in RepoEditAsync summary: "Edit a repository's properties. Only fields that are set will be changed"This happens in 1.22-RC.1 and also 1.21.11 , but not in 1.21.1 (that's the versions we tested)
Gitea Version
1.22-RC.1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Database
SQLite
The text was updated successfully, but these errors were encountered: