mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-05 01:25:38 -05:00
Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c (#8525)
* Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c * remove files we don't want * fix hygiene * update distro * update distro * fix hygiene * fix strict nulls * distro * distro * fix tests * fix tests * add another edit * fix viewlet icon * fix azure dialog * fix some padding * fix more padding issues
This commit is contained in:
26
src/vs/code/common/issue/issueReporterUtil.ts
Normal file
26
src/vs/code/common/issue/issueReporterUtil.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { endsWith, rtrim } from 'vs/base/common/strings';
|
||||
|
||||
export function normalizeGitHubUrl(url: string): string {
|
||||
// If the url has a .git suffix, remove it
|
||||
if (endsWith(url, '.git')) {
|
||||
url = url.substr(0, url.length - 4);
|
||||
}
|
||||
|
||||
// Remove trailing slash
|
||||
url = rtrim(url, '/');
|
||||
|
||||
if (endsWith(url, '/new')) {
|
||||
url = rtrim(url, '/new');
|
||||
}
|
||||
|
||||
if (endsWith(url, '/issues')) {
|
||||
url = rtrim(url, '/issues');
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
Reference in New Issue
Block a user