Skip to content

Commit

Permalink
Pass cancellation token from CLI to cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell committed Mar 8, 2024
1 parent 8c2a569 commit 0101f03
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tingle.AzureCleaner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@
new Option<string?>(["--remote", "--remote-url"], "Remote URL of the Azure DevOps repository."),
new Option<string?>(["--project", "--project-url"], "Project URL. Overrides the remote URL when provided."),
};
root.Handler = CommandHandler.Create(async (IHost host, int pullRequestId, string[] subscription, string? remoteUrl, string? projectUrl) =>
root.Handler = CommandHandler.Create(async (IHost host, int pullRequestId, string[] subscription, string? remoteUrl, string? projectUrl, CancellationToken cancellationToken) =>
{
var cleaner = host.Services.GetRequiredService<AzureCleaner>();
await cleaner.HandleAsync(prId: pullRequestId,
subscriptionIdsOrNames: subscription,
remoteUrl: remoteUrl,
rawProjectUrl: projectUrl);
rawProjectUrl: projectUrl,
cancellationToken: cancellationToken);
});

var clb = new CommandLineBuilder(root)
Expand Down

0 comments on commit 0101f03

Please sign in to comment.