Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/tooling/docs-assembler/Cli/ContentSourceCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,13 @@ public async Task<int> Match([Argument] string? repository = null, [Argument] st
var fs = new FileSystem();
var service = new RepositoryBuildMatchingService(logFactory, configuration, configurationContext, githubActionsService, fs);
serviceInvoker.AddCommand(service, (repository, branchOrTag),
static async (s, collector, state, _) => await s.ShouldBuild(collector, state.repository, state.branchOrTag)
);
static async (s, collector, state, ctx) =>
{
_ = await s.ShouldBuild(collector, state.repository, state.branchOrTag);
// ShouldBuild throws an exception on bad args and will return false if it has no matches
// We return true to the service invoker to continue
return true;
});

return await serviceInvoker.InvokeAsync(ctx);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,13 @@ public async Task<int> Match([Argument] string? repository = null, [Argument] st
var fs = new FileSystem();
var service = new RepositoryBuildMatchingService(logFactory, configuration, configurationContext, githubActionsService, fs);
serviceInvoker.AddCommand(service, (repository, branchOrTag),
static async (s, collector, state, _) => await s.ShouldBuild(collector, state.repository, state.branchOrTag)
);
static async (s, collector, state, ctx) =>
{
_ = await s.ShouldBuild(collector, state.repository, state.branchOrTag);
// ShouldBuild throws an exception on bad args and will return false if it has no matches
// We return true to the service invoker to continue
return true;
});

return await serviceInvoker.InvokeAsync(ctx);
}
Expand Down
Loading