~emersion/hottub

7f8fb0349273d6c31b164e64d8455c9b7f11a07c — Simon Ser 3 months ago 9da72c5
Set BUILD_SUBMITTER
1 files changed, 11 insertions(+), 0 deletions(-)

M main.go
M main.go => main.go +11 -0
@@ 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)