Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#1,929 0 bình luận 2 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
csharp, powershell
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu bằng cách đọc các đường dẫn lệnh hiện có của Publish-PSResource và Find-PSResource, sau đó kiểm tra hành vi unlisting và quyền của PowerShell Gallery API. Hoàn thành khi Unpublish-PSResource có thể nhắm đến các phiên bản stable hoặc prerelease cụ thể, chấp nhận API key và xử lý đầu vào pipeline cho nhiều resource.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C#
Star
577
Fork
114
Merge trung bình
23 giờ 17 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PowerShell/PSResourceGet

Tất cả issue của PowerShell/PSResourceGet

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.