Remove query string when extracting repo parts (#46)
* Refactor action link build to support both ADO and VSS URL formats Now supports: https://dev.azure.com/{org}/{project}/ and https://{org}.visualstudio.com/{project}/ * Bring in help function * Remove querystring from repo name segment * Bump version
This commit is contained in:
Родитель
60881d8f80
Коммит
2860516e2c
|
@ -34,7 +34,7 @@ export function getRepositoryDetailsFromRemoteUrl(remoteUrl: string): Repository
|
|||
return {
|
||||
organizationName: parts[0].trim(),
|
||||
projectName: parts[1].trim(),
|
||||
repositoryName: parts[3].trim()
|
||||
repositoryName: parts[3].split('?')[0].trim()
|
||||
};
|
||||
} else if (remoteUrl.indexOf(VSOUrl) >= 0) {
|
||||
const part = remoteUrl.substring(remoteUrl.indexOf(VSOUrl) + VSOUrl.length);
|
||||
|
@ -53,7 +53,7 @@ export function getRepositoryDetailsFromRemoteUrl(remoteUrl: string): Repository
|
|||
return {
|
||||
organizationName: organizationName,
|
||||
projectName: parts[0].trim(),
|
||||
repositoryName: parts[2].trim()
|
||||
repositoryName: parts[2].split('?')[0].trim()
|
||||
};
|
||||
} else if (remoteUrl.indexOf(SSHAzureReposUrl) >= 0 || remoteUrl.indexOf(SSHVsoReposUrl) >= 0) {
|
||||
const urlFormat = remoteUrl.indexOf(SSHAzureReposUrl) >= 0 ? SSHAzureReposUrl : SSHVsoReposUrl;
|
||||
|
@ -66,7 +66,7 @@ export function getRepositoryDetailsFromRemoteUrl(remoteUrl: string): Repository
|
|||
return {
|
||||
organizationName: parts[0].trim(),
|
||||
projectName: parts[1].trim(),
|
||||
repositoryName: parts[2].trim()
|
||||
repositoryName: parts[2].split('?')[0].trim()
|
||||
};
|
||||
} else {
|
||||
return { errorMessage: notAzureRepoUrl };
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@microsoft/sarif-web-component",
|
||||
"version": "0.6.0-25",
|
||||
"version": "0.6.0-26",
|
||||
"author": "Microsoft",
|
||||
"description": "SARIF Viewer",
|
||||
"license": "MIT",
|
||||
|
|
Загрузка…
Ссылка в новой задаче