Add default bot url

This commit is contained in:
Lunny Xiao authored and Jason Song committed 2022-11-25 17:48:47 +08:00
1 parent 1a55d39adc
commit fc2c70033a
4 files changed
+46 -27

No files matched your search

@@ -8,21 +8,23 @@ import (
"code.gitea.io/gitea/modules/log"
)
// Builds settings
// Bots settings
var (
Builds = struct {
Bots = struct {
Storage
Enabled bool
Enabled bool
DefaultBotsURL string
}{
Enabled: true,
Enabled: false,
DefaultBotsURL: "https://gitea.com",
}
)
func newBuilds() {
sec := Cfg.Section("builds")
if err := sec.MapTo(&Builds); err != nil {
sec := Cfg.Section("bots")
if err := sec.MapTo(&Bots); err != nil {
log.Fatal("Failed to map Builds settings: %v", err)
}
Builds.Storage = getStorage("builds", "", nil)
Bots.Storage = getStorage("bots_log", "", nil)
}