Skip to content

Commit d4e459e

Browse files
committed
Remove legacy code
1 parent 7eefe25 commit d4e459e

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

routers/web/repo/setting/setting.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -207,15 +207,7 @@ func handleSettingsPostUpdate(ctx *context.Context) {
207207
repo.Website = form.Website
208208
repo.IsTemplate = form.Template
209209

210-
// Visibility of forked repository is forced sync with base repository.
211-
visibilityChanged := false
212-
if repo.IsFork {
213-
preVisibility := repo.IsPrivate
214-
repo.IsPrivate = repo.BaseRepo.IsPrivate || repo.BaseRepo.Owner.Visibility == structs.VisibleTypePrivate
215-
visibilityChanged = preVisibility != repo.IsPrivate
216-
}
217-
218-
if err := repo_service.UpdateRepository(ctx, repo, visibilityChanged); err != nil {
210+
if err := repo_service.UpdateRepository(ctx, repo, false); err != nil {
219211
ctx.ServerError("UpdateRepository", err)
220212
return
221213
}

services/forms/repo_form.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ type RepoSettingForm struct {
104104
PushMirrorPassword string
105105
PushMirrorSyncOnCommit bool
106106
PushMirrorInterval string
107-
Private bool
108107
Template bool
109108
EnablePrune bool
110109

0 commit comments

Comments
 (0)