172
return uriReference;
173
}
175
>
const scpReference = parseScpMarketplaceReference(rawValue);
176
>
if (scpReference) {
177
return scpReference;
178
}
180
>
const shorthandMatch = /^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)(?:#(.+))?$/.exec(rawValue);
181
>
if (shorthandMatch) {
182
>
const owner = shorthandMatch[1];
183
>
const repo = shorthandMatch[2];
184
>
const ref = shorthandMatch[3];
185
>
return {
186
>
rawValue,
187
>
displayLabel: rawValue,
188
>
cloneUrl: `https://github.com/${owner}/${repo}.git`,
189
>
canonicalId: getGitHubCanonicalId(owner, repo, ref),
190
>
cacheSegments: ['github.com', owner, repo, ...getRefCacheSegments(ref)],
191
>
kind: MarketplaceReferenceKind.GitHubShorthand,
192
>
ref,
193
>
githubRepo: `${owner}/${repo}`,
194
>
};
195
>
}
196
197
return undefined;