@@ -253,7 +253,7 @@ filter New-GitHubRelease
253
253
254
254
. PARAMETER Commitish
255
255
The commitsh value that determines where the Git tag is created from.
256
- Cn be any branch or commit SHA. Unused if the Git tag already exists.
256
+ Can be any branch or commit SHA. Unused if the Git tag already exists.
257
257
Will default to the repository's default branch (usually 'master').
258
258
259
259
. PARAMETER Name
@@ -312,6 +312,7 @@ filter New-GitHubRelease
312
312
313
313
[string ] $Name ,
314
314
315
+ [Alias (' Description' )]
315
316
[string ] $Body ,
316
317
317
318
[switch ] $Draft ,
@@ -400,7 +401,7 @@ filter Set-GitHubRelease
400
401
401
402
. PARAMETER Commitish
402
403
The commitsh value that determines where the Git tag is created from.
403
- Cn be any branch or commit SHA. Unused if the Git tag already exists.
404
+ Can be any branch or commit SHA. Unused if the Git tag already exists.
404
405
Will default to the repository's default branch (usually 'master').
405
406
406
407
. PARAMETER Name
@@ -461,6 +462,7 @@ filter Set-GitHubRelease
461
462
462
463
[string ] $Name ,
463
464
465
+ [Alias (' Description' )]
464
466
[string ] $Body ,
465
467
466
468
[switch ] $Draft ,
@@ -913,7 +915,9 @@ filter New-GitHubReleaseAsset
913
915
ParameterSetName = ' UploadUrl' )]
914
916
[string ] $UploadUrl ,
915
917
916
- [Parameter (Mandatory )]
918
+ [Parameter (
919
+ Mandatory
920
+ ValueFromPipeline )]
917
921
[ValidateScript ({if (Test-Path - Path $_ - PathType Leaf) { $true } else { throw " $_ does not exist or is inaccessible." }})]
918
922
[string ] $Path ,
919
923
@@ -957,10 +961,10 @@ filter New-GitHubReleaseAsset
957
961
$Path = Resolve-UnverifiedPath - Path $Path
958
962
$file = Get-Item - Path $Path
959
963
$fileName = $file.Name
960
- $fileNameEncoded = [System.Web.HTTPUtility ]::UrlEncode ($fileName )
964
+ $fileNameEncoded = [Uri ]::EscapeDataString ($fileName )
961
965
$queryParams = @ (" name=$fileNameEncoded " )
962
966
963
- $labelEncoded = [System.Web.HTTPUtility ]::UrlEncode ($Label )
967
+ $labelEncoded = [Uri ]::EscapeDataString ($Label )
964
968
if (-not [String ]::IsNullOrWhiteSpace($Label )) { $queryParams += " label=$labelEncoded " }
965
969
966
970
$params = @ {
0 commit comments