PowerShell / PowerShell/PSResourceGet

Add a Rename-PSResourceRepository cmdlet

Open
#714 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-PSRepository feature_request
Dominant language
C#
Stars
576
Forks
114
Avg merge
1d 2h
Merged PRs (30d)
7

Description

Summary of the new feature / enhancement

Currently the only way to rename a resource repository is to first unregister and then register it again. To make this easier for the user please introduce a Rename-PSResourceRepository.

Proposed technical implementation details (optional)
SYNTAX
    Rename-PSResourceRepository [-Name] <string> [-NewName] <string> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
function Rename-PSResourceRepository {
    [CmdletBinding(SupportsShouldProcess)]
    param (
        [Parameter(Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [string]
        $Name,

        [Parameter(Mandatory, Position = 1, ValueFromPipelineByPropertyName)]
        [string]
        $NewName,

        [Parameter()]
        [switch]
        $PassThru
    )
    
    process {
        if ($PSCmdlet.ShouldProcess($Name)) {
            # Rename repository
        }
    }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing unregister and register resource repository cmdlets, since the issue identifies those as the current rename workflow. Add the proposed Rename-PSResourceRepository syntax and verify Name, NewName, PassThru, WhatIf, Confirm, and pipeline behavior; done means users can rename a repository without manually unregistering and registering it.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.