diff --git a/src/tooling/docs-assembler/Cli/ContentSourceCommands.cs b/src/tooling/docs-assembler/Cli/ContentSourceCommands.cs index 3f8a5e4de..a791e5db0 100644 --- a/src/tooling/docs-assembler/Cli/ContentSourceCommands.cs +++ b/src/tooling/docs-assembler/Cli/ContentSourceCommands.cs @@ -30,10 +30,14 @@ private void AssignOutputLogger() public async Task Match([Argument] string? repository = null, [Argument] string? branchOrTag = null, Cancel ctx = default) { AssignOutputLogger(); + var logger = logFactory.CreateLogger(); + var repo = repository ?? githubActionsService.GetInput("repository"); + var refName = branchOrTag ?? githubActionsService.GetInput("ref_name"); + logger.LogInformation(" Validating '{Repository}' '{BranchOrTag}' ", repo, refName); + if (string.IsNullOrEmpty(repo)) throw new ArgumentNullException(nameof(repository)); - var refName = branchOrTag ?? githubActionsService.GetInput("ref_name"); if (string.IsNullOrEmpty(refName)) throw new ArgumentNullException(nameof(branchOrTag)); @@ -50,18 +54,17 @@ public async Task Match([Argument] string? repository = null, [Argument] st Force = false, AllowIndexing = false }; - var logger = logFactory.CreateLogger(); var matches = assembleContext.Configuration.Match(repo, refName); if (matches == null) { - logger.LogInformation("'{Repository}' '{BranchOrTag}' combination not found in configuration.", repository, branchOrTag); + logger.LogInformation("'{Repository}' '{BranchOrTag}' combination not found in configuration.", repo, refName); await githubActionsService.SetOutputAsync("content-source-match", "false"); await githubActionsService.SetOutputAsync("content-source-name", ""); } else { var name = matches.Value.ToStringFast(true); - logger.LogInformation("'{Repository}' '{BranchOrTag}' is configured as '{Matches}' content-source", repository, branchOrTag, name); + logger.LogInformation("'{Repository}' '{BranchOrTag}' is configured as '{Matches}' content-source", repo, refName, name); await githubActionsService.SetOutputAsync("content-source-match", "true"); await githubActionsService.SetOutputAsync("content-source-name", name);