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

Allow site admin to disable mirrors #11740

Merged
merged 6 commits into from
Jun 3, 2020

Conversation

jolheiser
Copy link
Member

@jolheiser jolheiser commented Jun 2, 2020

Wording is consistent with FORCE_PRIVATE

mirrors

This will stop the creation of new mirror migrations. For existing mirrors, the site admin will need to turn off the cron for updating them (or delete them).

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
@jolheiser jolheiser added the type/enhancement An improvement of existing functionality label Jun 2, 2020
@jolheiser jolheiser added this to the 1.13.0 milestone Jun 2, 2020
Signed-off-by: jolheiser <john.olheiser@gmail.com>
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jun 2, 2020
Copy link
Member

@guillep2k guillep2k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a comment change suggestion. Otherwise LG-TM.

custom/conf/app.ini.sample Outdated Show resolved Hide resolved
docs/content/doc/advanced/config-cheat-sheet.en-us.md Outdated 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 Jun 2, 2020
jolheiser and others added 2 commits June 2, 2020 17:17
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
@techknowlogick
Copy link
Member

ping LG-TM

@techknowlogick techknowlogick merged commit a6fd2f2 into go-gitea:master Jun 3, 2020
@jolheiser jolheiser deleted the disable-mirror branch June 3, 2020 01:22
@6543
Copy link
Member

6543 commented Jun 4, 2020

@Codeberg-org this can be usefull for you :)

(so you can drop your own patch then ...)

@@ -118,7 +118,7 @@ func Migrate(ctx *context.APIContext, form auth.MigrateRepoForm) {
RepoName: form.RepoName,
Description: form.Description,
Private: form.Private || setting.Repository.ForcePrivate,
Mirror: form.Mirror,
Mirror: form.Mirror && !setting.Repository.DisableMirrors,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would had prefered to return an error

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> #11757

ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
* Allow site admin to disable mirrors

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* No need to run through Safe

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Clarify only disabling NEW mirrors

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Apply suggestions from @guillep2k

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
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. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants