Skip to content

Add Clone Site feature to Actions Hub#1545

Merged
priyanshu92 merged 17 commits into
mainfrom
users/priyanshuag/actions-hub-clone-site
May 12, 2026
Merged

Add Clone Site feature to Actions Hub#1545
priyanshu92 merged 17 commits into
mainfrom
users/priyanshuag/actions-hub-clone-site

Conversation

@priyanshu92
Copy link
Copy Markdown
Contributor

  • 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

@priyanshu92 priyanshu92 requested review from a team as code owners April 9, 2026 03:41
@priyanshu92 priyanshu92 enabled auto-merge (squash) April 9, 2026 03:42
@priyanshu92 priyanshu92 force-pushed the users/priyanshuag/actions-hub-clone-site branch from 4bd9be9 to 5cb17db Compare April 9, 2026 03:42
Priyanshu Agrawal and others added 3 commits April 9, 2026 11:35
- 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>
@priyanshu92 priyanshu92 force-pushed the users/priyanshuag/actions-hub-clone-site branch from 713ce82 to 205bf59 Compare April 9, 2026 06:05
Priyanshu Agrawal and others added 14 commits April 15, 2026 11:50
- 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>
…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>
@priyanshu92 priyanshu92 merged commit 4d43050 into main May 12, 2026
9 checks passed
@priyanshu92 priyanshu92 deleted the users/priyanshuag/actions-hub-clone-site branch May 12, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants