From 7f8fb0349273d6c31b164e64d8455c9b7f11a07c Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 22 Feb 2023 11:45:29 +0100 Subject: [PATCH] Set BUILD_SUBMITTER --- main.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/main.go b/main.go index ee4849d..157b3b8 100644 --- a/main.go +++ b/main.go @@ -430,6 +430,17 @@ func startJob(ctx *checkSuiteContext, filename string) error { } } + envIface, ok := manifest["environment"] + if !ok { + envIface = make(map[string]interface{}) + manifest["environment"] = envIface + } + env, ok := envIface.(map[string]interface{}) + if !ok { + return fmt.Errorf("invalid manifest: `environment` is not a map with string keys") + } + env["BUILD_SUBMITTER"] = "hottub" + manifestBuf, err := yaml.Marshal(manifest) if err != nil { return fmt.Errorf("failed to marshal manifest: %v", err) -- 2.38.5