Consider adding utility functions on the WorkflowRun to customize fields. This will allow generators that use the API to set their own build type and fields easier.
Some earlier suggestions from @laurentsimon
Just a last-minute thought. We could also have WithXXX() functions, which may be simple too:
r := slsa.NewWorkflowRun(subjects, githubContext)
.WithBuildType("some_string")
.WithBuildConfig(some_struct)
func (self * WorkflowRun) WithBuildConfig(arg interface{}) *WorkflowRun{
self.BuildConfig = arg
return self
}
Can do that in a follow-up PR if we want
Maybe AddMaterial() and AddEnvironment() would work. Let's just file an issue for later discussion.
Consider adding utility functions on the WorkflowRun to customize fields. This will allow generators that use the API to set their own build type and fields easier.
Some earlier suggestions from @laurentsimon