Add git clone for project to Open Existing dialog (#15244)

* expose git clone api

* add git clone option for projects in open existing dialog

* add sql carbon edits

* cleanup and error handling

* fix telemetry property

* addressing comments

* add gitignore

* copy git.d.ts from git extension

* remove copy of git.d.ts from data-workspace extension

* use single quotes

* Remove git copy from git clone PR (#15286)

* Remove copy git typings

* Remove gitignore

* update error messages

* lowercase

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
Kim Santiago
2021-04-30 08:12:22 -10:00
committed by GitHub
parent f2ee8b11b4
commit 25681defd8
8 changed files with 120 additions and 34 deletions

View File

@@ -20,10 +20,12 @@ export const EnterWorkspaceConfirmation = localize('dataworkspace.enterWorkspace
export const WorkspaceContainsNotAddedProjects = localize('dataworkspace.workspaceContainsNotAddedProjects', "The current workspace contains one or more projects that have not been added to the workspace. Use the 'Open existing' dialog to add projects to the projects pane.");
export const LaunchOpenExisitingDialog = localize('dataworkspace.launchOpenExistingDialog', "Launch Open existing dialog");
export const DoNotShowAgain = localize('dataworkspace.doNotShowAgain', "Do not show again");
export const ProjectsFailedToLoad = localize('dataworkspace.projectsFailedToLoad', "Some projects failed to load. Please open console for more information");
export const ProjectsFailedToLoad = localize('dataworkspace.projectsFailedToLoad', "Some projects failed to load. To view more details, [open the developer console](command:workbench.action.toggleDevTools)");
export const fileDoesNotExist = (name: string): string => { return localize('fileDoesNotExist', "File '{0}' doesn't exist", name); };
export const projectNameNull = localize('projectNameNull', "Project name is null");
export const noPreviousData = (tableName: string): string => { return localize('noPreviousData', "Prior {0} for the current project will appear here, please run to see the results.", tableName); };
export const gitCloneMessage = (url: string): string => { return localize('gitCloneMessage', "Cloning git repository '{0}'...", url); };
export const gitCloneError = localize('gitCloneError', "Error during git clone. View git output for more details");
// config settings
export const projectsConfigurationKey = 'projects';

View File

@@ -81,6 +81,14 @@ export interface IWorkspaceService {
*/
createProject(name: string, location: vscode.Uri, projectTypeId: string, workspaceFile?: vscode.Uri): Promise<vscode.Uri>;
/**
* Clones git repository and adds projects to workspace
* @param url The url to clone from
* @param localClonePath local path to clone repository to
* @param workspaceFile workspace file to add the projects to
*/
gitCloneProject(url: string, localClonePath: string, workspaceFile: vscode.Uri): Promise<void>;
readonly isProjectProviderAvailable: boolean;
/**