diff --git a/packages/vscode-docker-registries-extension/src/clients/Azure/AzureRegistryDataProvider.ts b/packages/vscode-docker-registries-extension/src/clients/Azure/AzureRegistryDataProvider.ts index 7ccc731e..9cacad9e 100644 --- a/packages/vscode-docker-registries-extension/src/clients/Azure/AzureRegistryDataProvider.ts +++ b/packages/vscode-docker-registries-extension/src/clients/Azure/AzureRegistryDataProvider.ts @@ -162,22 +162,6 @@ export class AzureRegistryDataProvider extends RegistryV2DataProvider implements } } - public async deleteTag(item: AzureTag): Promise { - const authenticationProvider = this.getAuthenticationProvider(item.parent.parent as unknown as AzureRegistryItem); - - const reponse = await registryV2Request({ - method: 'DELETE', - registryUri: item.baseUrl, - path: ['v2', '_acr', `${item.parent.label}`, 'tags', `${item.label}`], - scopes: [`repository:${item.parent.label}:delete`], - authenticationProvider: authenticationProvider, - }); - - if (!reponse.succeeded) { - throw new Error(`Failed to delete tag: ${reponse.statusText}`); - } - } - protected override getAuthenticationProvider(item: AzureRegistryItem): ACROAuthProvider { const registryString = item.baseUrl.toString(); diff --git a/packages/vscode-docker-registries/src/clients/GitHub/GitHubRegistryDataProvider.ts b/packages/vscode-docker-registries/src/clients/GitHub/GitHubRegistryDataProvider.ts index 3b4d9835..827bda51 100644 --- a/packages/vscode-docker-registries/src/clients/GitHub/GitHubRegistryDataProvider.ts +++ b/packages/vscode-docker-registries/src/clients/GitHub/GitHubRegistryDataProvider.ts @@ -40,7 +40,7 @@ export class GitHubRegistryDataProvider extends RegistryV2DataProvider { public async onConnect(): Promise { const wizardContext: RegistryWizardContext = { usernamePrompt: vscode.l10n.t('GitHub Username'), - secretPrompt: vscode.l10n.t('GitHub Personal Access Token (requires `repo` scope for read-only operations)'), // TODO: add scope for write + secretPrompt: vscode.l10n.t('GitHub Personal Access Token (requires `repo` and `write:packages` scopes)'), }; const wizard = new RegistryWizard( @@ -74,6 +74,7 @@ export class GitHubRegistryDataProvider extends RegistryV2DataProvider { baseUrl: GitHubContainerRegistryUri, label: org, type: 'commonregistry', + additionalContextValues: ['githubRegistry'] } )); } diff --git a/packages/vscode-docker-registries/src/clients/RegistryV2/RegistryV2DataProvider.ts b/packages/vscode-docker-registries/src/clients/RegistryV2/RegistryV2DataProvider.ts index f092db22..3b60f3f6 100644 --- a/packages/vscode-docker-registries/src/clients/RegistryV2/RegistryV2DataProvider.ts +++ b/packages/vscode-docker-registries/src/clients/RegistryV2/RegistryV2DataProvider.ts @@ -122,10 +122,7 @@ export abstract class RegistryV2DataProvider extends CommonRegistryDataProvider method: 'DELETE', registryUri: registry.baseUrl, path: ['v2', item.parent.label, 'manifests', digest], - scopes: [`repository:${item.parent.label}:pull`], - headers: { - 'accept': 'application/vnd.docker.distribution.manifest.v2+json' - } + scopes: [`repository:${item.parent.label}:delete`] }); }