From d0762f5db97e62efc3e423cc1845058dbdc9b1a6 Mon Sep 17 00:00:00 2001 From: Christopher Fenner <26137398+CCFenner@users.noreply.github.com> Date: Tue, 7 Dec 2021 15:54:59 +0100 Subject: [PATCH] fix: use correct metadata resolver (#3342) * fix something * add default metadata resolver Co-authored-by: ffeldmann --- cmd/getConfig.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/getConfig.go b/cmd/getConfig.go index 3f9c5e278..0586d5365 100644 --- a/cmd/getConfig.go +++ b/cmd/getConfig.go @@ -127,7 +127,10 @@ func getConfig() (config.StepConfig, error) { } else { log.Entry().Infof("Printing stepName %s", configOptions.stepName) - metadata, err := config.ResolveMetadata(GeneralConfig.GitHubAccessTokens, GetAllStepMetadata, configOptions.stepMetadata, configOptions.stepName) + if GeneralConfig.MetaDataResolver == nil { + GeneralConfig.MetaDataResolver = GetAllStepMetadata + } + metadata, err := config.ResolveMetadata(GeneralConfig.GitHubAccessTokens, GeneralConfig.MetaDataResolver, configOptions.stepMetadata, configOptions.stepName) if err != nil { return stepConfig, errors.Wrapf(err, "failed to resolve metadata") }