From 033af8bd1e0798e1f63b556579a7d0ed69385abf Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Mon, 3 Jan 2022 21:28:46 +0100 Subject: [PATCH] TODOs --- server/shared/procBuilder.go | 1 + server/store/datastore/build.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/server/shared/procBuilder.go b/server/shared/procBuilder.go index 86426887883..e408f615a95 100644 --- a/server/shared/procBuilder.go +++ b/server/shared/procBuilder.go @@ -192,6 +192,7 @@ func containsItemWithName(name string, items []*BuildItem) bool { func (b *ProcBuilder) envsubst(y string, environ map[string]string) (string, error) { return envsubst.Eval(y, func(name string) string { env := environ[name] + // TODO: check if we should escape in general (what about \t ...?) if strings.Contains(env, "\n") { env = fmt.Sprintf("%q", env) } diff --git a/server/store/datastore/build.go b/server/store/datastore/build.go index 1275df91172..65a2c72c986 100644 --- a/server/store/datastore/build.go +++ b/server/store/datastore/build.go @@ -85,6 +85,8 @@ func (s storage) GetBuildCount() (int64, error) { } func (s storage) CreateBuild(build *model.Build, procList ...*model.Proc) error { + // TODO: Verify repoID exist ... + sess := s.engine.NewSession() defer sess.Close() if err := sess.Begin(); err != nil {