Skip to content
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

Add SyncOnCommit when adding push mirror via API calls #22267

Closed
wizpresso-steve-cy-fan opened this issue Dec 29, 2022 · 0 comments · Fixed by #22271
Closed

Add SyncOnCommit when adding push mirror via API calls #22267

wizpresso-steve-cy-fan opened this issue Dec 29, 2022 · 0 comments · Fixed by #22271
Labels
modifies/api This PR adds API routes or modifies them type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@wizpresso-steve-cy-fan
Copy link

Feature Description

Currently there is no way to set it:

type CreatePushMirrorOption struct {
RemoteAddress string `json:"remote_address"`
RemoteUsername string `json:"remote_username"`
RemotePassword string `json:"remote_password"`
Interval string `json:"interval"`
}

Despite it should be true:

SyncOnCommit bool `xorm:"NOT NULL DEFAULT true"`

For some reason it is not working in reality. The field is set to false if I made the push mirror option using OpenAPI. It works when I add it in web settings though. Pretty sure it is a missing API feature

Screenshots

No response

@wizpresso-steve-cy-fan wizpresso-steve-cy-fan added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Dec 29, 2022
@lunny lunny added modifies/api This PR adds API routes or modifies them and removed type/feature Completely new functionality. Can only be merged if feature freeze is not active. labels Dec 29, 2022
lunny pushed a commit that referenced this issue Dec 30, 2022
Push mirrors `sync_on_commit` option was added to the web interface in
v1.18.0. However, it's not added to the API. This PR updates the API
endpoint.

Fixes #22267

Also, I think this should be backported to 1.18
harryzcy added a commit to harryzcy/gitea that referenced this issue Dec 31, 2022
Push mirrors `sync_on_commit` option was added to the web interface in
v1.18.0. However, it's not added to the API. This PR updates the API
endpoint.

Fixes go-gitea#22267

Also, I think this should be backported to 1.18
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
modifies/api This PR adds API routes or modifies them type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants