Skip to content

Commit ce85921

Browse files
committed
Applying more CR feedback
1 parent ca8fe16 commit ce85921

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

GitHubReleases.ps1

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ filter Get-GitHubRelease
5353
Gets all releases for the default configured owner/repository.
5454
5555
.EXAMPLE
56-
Get-GitHubRelease -ReleaseId 12345
56+
Get-GitHubRelease -Release 12345
5757
5858
Get a specific release for the default configured owner/repository
5959
@@ -244,7 +244,7 @@ filter New-GitHubRelease
244244
245245
.PARAMETER Commitish
246246
The commitsh value that determines where the Git tag is created from.
247-
Cn be any branch or commit SHA. Unused if the Git tag already exists.
247+
Can be any branch or commit SHA. Unused if the Git tag already exists.
248248
Will default to the repository's default branch (usually 'master').
249249
250250
.PARAMETER Name
@@ -303,6 +303,7 @@ filter New-GitHubRelease
303303

304304
[string] $Name,
305305

306+
[Alias('Description')]
306307
[string] $Body,
307308

308309
[switch] $Draft,
@@ -391,7 +392,7 @@ filter Set-GitHubRelease
391392
392393
.PARAMETER Commitish
393394
The commitsh value that determines where the Git tag is created from.
394-
Cn be any branch or commit SHA. Unused if the Git tag already exists.
395+
Can be any branch or commit SHA. Unused if the Git tag already exists.
395396
Will default to the repository's default branch (usually 'master').
396397
397398
.PARAMETER Name
@@ -452,6 +453,7 @@ filter Set-GitHubRelease
452453

453454
[string] $Name,
454455

456+
[Alias('Description')]
455457
[string] $Body,
456458

457459
[switch] $Draft,
@@ -904,7 +906,9 @@ filter New-GitHubReleaseAsset
904906
ParameterSetName='UploadUrl')]
905907
[string] $UploadUrl,
906908

907-
[Parameter(Mandatory)]
909+
[Parameter(
910+
Mandatory
911+
ValueFromPipeline)]
908912
[ValidateScript({if (Test-Path -Path $_ -PathType Leaf) { $true } else { throw "$_ does not exist or is inaccessible." }})]
909913
[string] $Path,
910914

@@ -948,10 +952,10 @@ filter New-GitHubReleaseAsset
948952
$Path = Resolve-UnverifiedPath -Path $Path
949953
$file = Get-Item -Path $Path
950954
$fileName = $file.Name
951-
$fileNameEncoded = [System.Web.HTTPUtility]::UrlEncode($fileName)
955+
$fileNameEncoded = [Uri]::EscapeDataString($fileName)
952956
$queryParams = @("name=$fileNameEncoded")
953957

954-
$labelEncoded = [System.Web.HTTPUtility]::UrlEncode($Label)
958+
$labelEncoded = [Uri]::EscapeDataString($Label)
955959
if (-not [String]::IsNullOrWhiteSpace($Label)) { $queryParams += "label=$labelEncoded" }
956960

957961
$params = @{

0 commit comments

Comments
 (0)