azdo-cli 0.10.0-develop.543 → 0.10.0-develop.558
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -975,11 +975,18 @@ function parseSingleRemoteLine(line) {
|
|
|
975
975
|
const url = urlEnd === -1 ? afterTab : afterTab.slice(0, urlEnd);
|
|
976
976
|
return { remoteName, url };
|
|
977
977
|
}
|
|
978
|
+
function decodePctSegment(segment) {
|
|
979
|
+
try {
|
|
980
|
+
return decodeURIComponent(segment);
|
|
981
|
+
} catch {
|
|
982
|
+
return segment;
|
|
983
|
+
}
|
|
984
|
+
}
|
|
978
985
|
function matchAzdoRemote(remoteName, url) {
|
|
979
986
|
for (const pattern of patterns) {
|
|
980
987
|
const match = pattern.exec(url);
|
|
981
988
|
if (!match) continue;
|
|
982
|
-
const project = match[2];
|
|
989
|
+
const project = decodePctSegment(match[2]);
|
|
983
990
|
if (/^DefaultCollection$/i.test(project)) return null;
|
|
984
991
|
return { remoteName, org: match[1], project, hasEmbeddedSecret: httpsEmbeddedSecret.test(url) };
|
|
985
992
|
}
|