From 242b0eb219dbb269deacdae76de2f8b0b788ac40 Mon Sep 17 00:00:00 2001 From: Pedro Lopes Date: Tue, 28 Jul 2020 15:55:14 -0500 Subject: pkg: get and store Maintainers data Create a struct on pkg/vcs to store data of syzkaller email recipients and update its users. The struct contains default name, email, and a label to divide user into To and Cc when sending the emails. --- pkg/build/build.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'pkg/build') diff --git a/pkg/build/build.go b/pkg/build/build.go index ffc5b0703..370bf25ab 100644 --- a/pkg/build/build.go +++ b/pkg/build/build.go @@ -15,6 +15,7 @@ import ( "github.com/google/syzkaller/pkg/osutil" "github.com/google/syzkaller/pkg/report" + "github.com/google/syzkaller/pkg/vcs" ) // Params is input arguments for the Image function. @@ -90,10 +91,10 @@ func Clean(targetOS, targetArch, vmType, kernelDir string) error { } type KernelError struct { - Report []byte - Output []byte - Maintainers []string - guiltyFile string + Report []byte + Output []byte + Recipients vcs.Recipients + guiltyFile string } func (err *KernelError) Error() string { @@ -195,7 +196,7 @@ func extractRootCause(err error, OS, kernelSrc string) error { if err != nil { kernelErr.Output = append(kernelErr.Output, err.Error()...) } - kernelErr.Maintainers = maintainers + kernelErr.Recipients = maintainers } return kernelErr } -- cgit mrf-deployment