1
1
mirror of https://github.com/go-gitea/gitea synced 2025-11-02 04:18:25 +00:00

Add builds UI

This commit is contained in:
Lunny Xiao
2022-05-03 16:03:24 +08:00
committed by Jason Song
parent 7732392a96
commit 5a479bb034
23 changed files with 599 additions and 50 deletions

View File

@@ -489,6 +489,15 @@ func SettingsPost(ctx *context.Context) {
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypePackages)
}
if form.EnableBuilds && !unit_model.TypeBuilds.UnitGlobalDisabled() {
units = append(units, repo_model.RepoUnit{
RepoID: repo.ID,
Type: unit_model.TypeBuilds,
})
} else if !unit_model.TypeBuilds.UnitGlobalDisabled() {
deleteUnitTypes = append(deleteUnitTypes, unit_model.TypeBuilds)
}
if form.EnablePulls && !unit_model.TypePullRequests.UnitGlobalDisabled() {
units = append(units, repo_model.RepoUnit{
RepoID: repo.ID,