You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update helper methods to grab appropriate default values from previous scope (#52)
* Updated `Resolve-ParameterWithDefaultConfigurationValue` and `Resolve-RepositoryElements`
to grab `$PSBoundParameters` from the previous (calling) scope if not provided.
* Updated `Write-InvocationLog` to grab `$MyInvocation` from the previous (calling) scope
if not explicitly provided.
In all cases, this will simpliy the standard calling pattern for these functions.
Copy file name to clipboardExpand all lines: GitHubConfiguration.ps1
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -711,6 +711,8 @@ function Resolve-ParameterWithDefaultConfigurationValue
711
711
712
712
.PARAMETERBoundParameters
713
713
The inbound parameters from the calling method.
714
+
No need to explicitly provide this if you're using the PSBoundParameters from the
715
+
function that is calling this directly.
714
716
715
717
.PARAMETERName
716
718
The name of the parameter in BoundParameters.
@@ -732,8 +734,7 @@ function Resolve-ParameterWithDefaultConfigurationValue
732
734
[CmdletBinding(SupportsShouldProcess)]
733
735
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess","", Justification="Methods called within here make use of PSShouldProcess, and the switch is passed on to them inherently.")]
@@ -743,6 +743,8 @@ function Resolve-RepositoryElements
743
743
.PARAMETERBoundParameters
744
744
The inbound parameters from the calling method.
745
745
This is expecting values that may include 'Uri', 'OwnerName' and 'RepositoryName'
746
+
No need to explicitly provide this if you're using the PSBoundParameters from the
747
+
function that is calling this directly.
746
748
747
749
.PARAMETERDisableValidation
748
750
By default, this function ensures that it returns with all elements provided,
@@ -758,8 +760,7 @@ function Resolve-RepositoryElements
758
760
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns","", Justification="This was the most accurate name that I could come up with. Internal only anyway.")]
0 commit comments