Skip to content

Commit 75040b9

Browse files
Update function template documentation and enhance GitHub context ass… (#209)
## Description This pull request includes changes to the `tools/utilities/New-FunctionTemplate.ps1` file to update documentation and improve context assertion. ### Function template update * `tools/utilities/New-FunctionTemplate.ps1` * Replaced the general notes section with a title and link. [[1]](diffhunk://#diff-744fac7ebd78c04d74015c27b179c4843ba0c23ae76ffc8957c4bb8ec022fe78L13-R13) * Added the `Assert-GitHubContext` function to assert a GitHub contexts authentication types. [[2]](diffhunk://#diff-744fac7ebd78c04d74015c27b179c4843ba0c23ae76ffc8957c4bb8ec022fe78L34-R35) * Fixes #186 ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent 4f65fa1 commit 75040b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/utilities/New-FunctionTemplate.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
An example
1111
1212
.NOTES
13-
General notes
13+
[Ttle](link)
1414
#>
1515
[CmdletBinding(SupportsShouldProcess)]
1616
param(
@@ -31,8 +31,8 @@
3131
begin {
3232
$commandName = $MyInvocation.MyCommand.Name
3333
Write-Debug "[$commandName] - Start"
34-
3534
$Context = Resolve-GitHubContext -Context $Context
35+
Assert-GitHubContext -Context $Context -AuthType IAT, PAT, UAT
3636

3737
if ([string]::IsNullOrEmpty($Enterprise)) {
3838
$Enterprise = $Context.Enterprise

0 commit comments

Comments
 (0)