Attempt at writing renew_queue function; seems to just stop in the

middle
This commit is contained in:
Jef Roosens 2022-04-13 16:12:22 +02:00
parent ff57d73998
commit f7e1aba30b
Signed by untrusted user: Jef Roosens
GPG key ID: B75D4F293C7052DB
10 changed files with 89 additions and 30 deletions

View file

@ -15,7 +15,7 @@ pub mut:
// Which repo the builder should publish packages to
repo string
// Cron schedule describing how frequently to build the repo.
schedule string
schedule string [optional]
}
// patch_from_params patches a GitRepo from a map[string]string, usually
@ -74,7 +74,7 @@ pub fn repo_from_params(params map[string]string) ?GitRepo {
// If we're creating a new GitRepo, we want all fields to be present before
// "patching".
$for field in GitRepo.fields {
if field.name !in params {
if field.name !in params && !field.attrs.contains('optional') {
return error('Missing parameter: ${field.name}.')
}
}