diff options
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/setting.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/routers/web/repo/setting.go b/routers/web/repo/setting.go index 09cb001772..ccb603833c 100644 --- a/routers/web/repo/setting.go +++ b/routers/web/repo/setting.go @@ -456,6 +456,15 @@ func SettingsPost(ctx *context.Context) { deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeProjects) } + if form.EnablePackages && !unit_model.TypeProjects.UnitGlobalDisabled() { + units = append(units, repo_model.RepoUnit{ + RepoID: repo.ID, + Type: unit_model.TypePackages, + }) + } else if !unit_model.TypePackages.UnitGlobalDisabled() { + deleteUnitTypes = append(deleteUnitTypes, unit_model.TypePackages) + } + if form.EnablePulls && !unit_model.TypePullRequests.UnitGlobalDisabled() { units = append(units, repo_model.RepoUnit{ RepoID: repo.ID, |