microsoft/PowerShellForGitHub

Consider adding PositionalBinding=$false for some functions

Open

#219 aberto em 2 de jun. de 2020

Ver no GitHub
 (3 comments) (0 reactions) (0 assignees)PowerShell (189 forks)auto 404
discussionenhancementhelp wantedup for grabs

Métricas do repositório

Stars
 (635 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

Feature Idea Summary

This comes out of a comment thread in #192. We've seen a number of times that users who forget to provide a - for the parameter name when calling Set-GitHubConfiguration end up mistakingly changing the configuration for one or more incorrect settings. The idea here is to use PositionalBinding=$false to disable positional binding for at least that function, if not others.

Feature Idea Additional Details

The concern with this idea is that the docs seem to imply that this started with PS5, but this module needs to continue to support PS4+ due to some internal requirements. If someone can verify that PS4 supports this configuration property, then we'd be safe to continue with it. That verification must happen first though.

https://github.com/microsoft/PowerShellForGitHub/blob/d1bd976d70cc975dfd247f9ad2bace58a465c7da/PowerShellForGitHub.psd1#L48-L49

Requested Assignment

I'm just suggesting this idea, but don't want to implement it.

Operating System

OsName               : Microsoft Windows 10 Pro
OsOperatingSystemSKU : 48
OsArchitecture       : 64-bit
WindowsVersion       : 1909
WindowsBuildLabEx    : 18362.1.amd64fre.19h1_release.190318-1202
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.0.1
PSEdition                      Core
GitCommitId                    7.0.1
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module Version

Running: 0.14.0
Installed:

Guia do colaborador