Skip to main content

apply

Function apply 

Source
pub fn apply(
    def: &mut Value,
    previous: Option<&TemplateRef>,
) -> Result<(), String>
Expand description

Lay the approved template under def, a job definition as JSON. Does nothing when def names no template.

previous is the pin the job has now, on an edit; None on a create. A create takes the template’s defaults for what def leaves out. An edit that names a different version or content than previous also takes the template’s policy defaults over the job’s (what update_diff showed).