Merge branch 'main' into graceful-validation-error

This commit is contained in:
Gusted 2023-01-28 13:35:18 +01:00
commit e7e3045601
No known key found for this signature in database
GPG Key ID: FD821B732837125F
1 changed files with 7 additions and 1 deletions

View File

@ -41,7 +41,13 @@ func (o *Options) CheckCanonicalDomain(giteaClient *gitea.Client, actualDomain,
}
// Only log the error on the last iteration.
if i == 2 {
if i != 2 {
continue
}
if err != gitea.ErrorNotFound {
log.Error().Err(err).Msgf("could not read %s of %s/%s", canonicalDomainConfig, o.TargetOwner, o.TargetRepo)
} else {
log.Info().Err(err).Msgf("could not read %s of %s/%s", canonicalDomainConfig, o.TargetOwner, o.TargetRepo)
}
}