Skip to content

Commit

Permalink
In GHCR, throw org names and repository names to lowercase (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
bwateratmsft authored Dec 16, 2024
1 parent 18b5837 commit 777e335
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export class GitHubRegistryDataProvider extends RegistryV2DataProvider {
results.push({
parent: registry,
baseUrl: registry.baseUrl,
label: repository,
label: repository.toLowerCase(), // GHCR in particular allows uppercase letters in repository names which is not actually valid. Need to throw them all to lowercase. See https://github.com/microsoft/vscode-docker/issues/4419
type: 'commonrepository',
});
}
Expand Down Expand Up @@ -175,7 +175,7 @@ export class GitHubRegistryDataProvider extends RegistryV2DataProvider {
});

for (const org of await response.json()) {
results.push(org.login);
results.push(org.login.toLowerCase()); // GHCR allows uppercase letters in organization names which leads to invalid repository names. Need to throw them all to lowercase. See https://github.com/microsoft/vscode-docker/issues/4419
}

return results;
Expand Down

0 comments on commit 777e335

Please sign in to comment.