Add `Unpublish-PSResource` command to unlist/hide module versions programmatically

Aperta
#1,929 0 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp, powershell
Ambito
cli

Direzione di ricerca

Inizia leggendo i percorsi dei comandi esistenti di Publish-PSResource e Find-PSResource, quindi esamina il comportamento di unlisting e delle autorizzazioni della PowerShell Gallery API. Il lavoro è completo quando Unpublish-PSResource può indirizzare versioni stabili o prerelease specifiche, accettare una chiave API ed elaborare input della pipeline per più risorse.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Area-Publish feature_request
Summary of the new feature / enhancement

As a PowerShell user automating module publishing workflows, I want a command to quickly unlist or hide specific versions of a module (such as prereleases after the full version is published), so that I can ensure only relevant versions are visible on the PowerShell Gallery without manual UI steps.

Currently, unlist functionality exists in the PowerShell Gallery UI and is also supported via API key permissions, but there is no native PowerShell command to do this in automation scenarios. This limits streamlined management when transitioning from prerelease to stable versions or when hiding obsolete/pre-release versions is required within CI/CD systems.

Proposed technical implementation details (optional)

Add a new cmdlet named Unpublish-PSResource. It should accept similar parameters as Find-PSResource, with the addition of -ApiKey (similar to Publish-PSResource). This command would use the API key (with appropriate unlist permission) to programmatically unlist or hide the specified package version on the Gallery.

The command should support:

  • Specifying a specific version (including prerelease versions) to unlist
  • Pipeline input from Find-PSResource to unpublish multiple resources at once

Example usage:

Unpublish-PSResource -Repository PSGallery -ApiKey $APIKey -Name $moduleName -Version 2.0.1 -Prerelease

# Unpublish multiple versions via pipeline
Find-PSResource -Name $moduleName -Version "2.0.1" -Prerelease | Unpublish-PSResource -Repository PSGallery -ApiKey $APIKey

This feature would greatly improve automation workflows for module publishers and mirror the manual UI and API support for unlisting that already exists.

Lingua principale
C#
Stelle
576
Fork
114
Merge medio
1g 2h
PR unite (30g)
7

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PowerShell/PSResourceGet

Tutte le issue di PowerShell/PSResourceGet

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.