     @outputView.show()
     @outputView.add 'Got repo as follow:', repo
 
-    { groupsController, router } = kd.singletons
+    { computeController, groupsController, router } = kd.singletons
+
+    if commitId
+      @outputView.add 'Checking existing VM for given commit id:', commitId
+      if machine = computeController.findMachineFromRemoteData { commitId }
+        @outputView.add "Found VM: #{machine.label} redirecting..."
+        kd.utils.wait 2000, ->
+          router.handleRoute "/IDE/#{machine.slug}"
+        return
+
+      @outputView.add "Couldn't find any VM, processing request..."
 
     groupsController.ready =>
 

    branch = Encoder.XSSEncode branch
    repo = "#{repo}/#{branch}"  if branch

  return repo


module.exports = class HomeStacksImport extends kd.CustomHTMLView


  handleQuery: (query = {}) -> @ready =>

    { repo, commitId } = parseQuery query

    @message.hide()
    @actionButton.hide()
