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

Fix issue that sync_on_commit is not set #21309

Merged
merged 2 commits into from
Oct 1, 2022
Merged

Conversation

harryzcy
Copy link
Contributor

@harryzcy harryzcy commented Oct 1, 2022

Fixes #21308.

With the original frontend template templates/repo/settings/options.tmpl, the field push_mirror_sync_on_commit is always empty even when checkbox is checked. Removing value from the input tag seems to solve the issue, and will set push_mirror_sync_on_commit: on when the checkbox is checked.

(I'm not familiar with the frontend logics Gitea is using, so I don't really understand the cause of it)

@harryzcy harryzcy changed the title Fix issue that sync_on_commit is not set Fix issue that sync_on_commit is not set Oct 1, 2022
@wxiaoguang
Copy link
Contributor

Should it be something like:

{{if .push_mirror_sync_on_commit}} checked {{/if}}

?

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 1, 2022
@harryzcy
Copy link
Contributor Author

harryzcy commented Oct 1, 2022

Should it be something like:

{{if .push_mirror_sync_on_commit}} checked {{/if}}

?

{{if .push_mirror_sync_on_commit}}checked{{end}} works. Thank you!

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 1, 2022
templates/repo/settings/options.tmpl Show resolved Hide resolved
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 1, 2022
@lafriks lafriks merged commit c333b4d into go-gitea:main Oct 1, 2022
@harryzcy harryzcy deleted the issue-21308 branch October 1, 2022 19:54
@wxiaoguang wxiaoguang added this to the 1.18.0 milestone Oct 7, 2022
@wxiaoguang
Copy link
Contributor

I think it's a bug and the PR is worth to be backported to 1.17. @harryzcy do you have time to send a backport?

@harryzcy
Copy link
Contributor Author

harryzcy commented Oct 8, 2022

I think it's a bug and the PR is worth to be backported to 1.17. @harryzcy do you have time to send a backport?

No, I believe 'sync-on-commit' feature is only added to 1.18, and not to 1.17. So we don't need to backport this fix to 1.17.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Oct 8, 2022

Oh yes, I missed that. 👍 let's mark it as skip-changelog

@wxiaoguang wxiaoguang added skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. and removed backport/v1.17 labels Oct 8, 2022
@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
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Push Mirror sync_on_commit is not properly set in the database
5 participants