Add Clone Site feature to Actions Hub#1545
Merged
Merged
Conversation
Contributor
priyanshu92
commented
Apr 9, 2026
- Add CloneSiteHandler with download, clone, and upload workflow
- Add cloneSiteWithProgress, uploadSiteWithProgress, and uploadCodeSiteWithProgress methods to PacWrapper
- Register cloneSite command in ActionsHubTreeDataProvider
- Add command and menu contributions in package.json
- Add localized strings, progress messages, and telemetry events
- Add unit tests for CloneSiteHandler and PacWrapper methods
4bd9be9 to
5cb17db
Compare
- Add CloneSiteHandler with download, clone, and upload workflow - Add cloneSiteWithProgress, uploadSiteWithProgress, and uploadCodeSiteWithProgress methods to PacWrapper - Register cloneSite command in ActionsHubTreeDataProvider - Add command and menu contributions in package.json - Add localized strings, progress messages, and telemetry events - Add unit tests for CloneSiteHandler and PacWrapper methods Co-Authored-By: Claude Opus 4.6 (1M context)(Internal only) <noreply@anthropic.com>
…-extra fs-extra exports non-configurable properties that cannot be stubbed with sinon. Instead of stubbing ensureDirSync/readdirSync, the tests now: - Let real temp directories be created - Have mock download/clone callbacks create site subfolders to simulate CLI behavior - Clean up temp dirs in afterEach Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
713ce82 to
205bf59
Compare
…ions-hub-clone-site
…ions-hub-clone-site
…ions-hub-clone-site
- Move web template localization strings after webfile entries for consistent ordering in bundle.l10n.json Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ions-hub-clone-site
…ions-hub-clone-site
…ation params - Wire VS Code CancellationToken through PacInterop.executeCommandWithProgress using a race-free settled+finalize pattern: onCancellationRequested only calls proc.kill(), while the promise resolves exclusively from close/error. This guarantees the caller's temp-dir cleanup runs after the child exits. - Add optional cancellationToken to all five *WithProgress helpers on PacWrapper. - CloneSiteHandler now runs the download/clone/upload pipeline inside a single cancellable progress notification, checks token.isCancellationRequested between steps, and on cancel fires ACTIONS_HUB_CLONE_SITE_CANCELLED telemetry + shows an info toast (no error, no tree refresh). Temp dir is still cleaned. - Reorder showProgressWithNotification signature to (title, cancellable, task) so the cancellable flag stays visible at the call site even when the task body spans many lines. cancellable is required; all 13 existing call sites updated to pass false explicitly. CloneSiteHandler passes true. - Add CLONE_SITE_CANCELLED string + ACTIONS_HUB_CLONE_SITE_CANCELLED event. - Add 5 cancellation tests covering: cancellable flag passed through, token threaded to each PAC step, no PAC calls when cancelled pre-download, mid-pipeline cancellation skips later steps, and no failure telemetry or error toast on cancel. - Update mock + 3 test-stub signatures for the new task arg position. - Refresh l10n bundle for the new cancellation string. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
amitjoshi438
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.