Skip to content

Commit

Permalink
Applying more CR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
HowardWolosky committed Jul 15, 2020
1 parent fd2ab2e commit e1bd0a4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions GitHubReleases.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ filter New-GitHubRelease
.PARAMETER Commitish
The commitsh value that determines where the Git tag is created from.
Cn be any branch or commit SHA. Unused if the Git tag already exists.
Can be any branch or commit SHA. Unused if the Git tag already exists.
Will default to the repository's default branch (usually 'master').
.PARAMETER Name
Expand Down Expand Up @@ -312,6 +312,7 @@ filter New-GitHubRelease

[string] $Name,

[Alias('Description')]
[string] $Body,

[switch] $Draft,
Expand Down Expand Up @@ -400,7 +401,7 @@ filter Set-GitHubRelease
.PARAMETER Commitish
The commitsh value that determines where the Git tag is created from.
Cn be any branch or commit SHA. Unused if the Git tag already exists.
Can be any branch or commit SHA. Unused if the Git tag already exists.
Will default to the repository's default branch (usually 'master').
.PARAMETER Name
Expand Down Expand Up @@ -461,6 +462,7 @@ filter Set-GitHubRelease

[string] $Name,

[Alias('Description')]
[string] $Body,

[switch] $Draft,
Expand Down Expand Up @@ -913,7 +915,9 @@ filter New-GitHubReleaseAsset
ParameterSetName='UploadUrl')]
[string] $UploadUrl,

[Parameter(Mandatory)]
[Parameter(
Mandatory
ValueFromPipeline)]
[ValidateScript({if (Test-Path -Path $_ -PathType Leaf) { $true } else { throw "$_ does not exist or is inaccessible." }})]
[string] $Path,

Expand Down Expand Up @@ -957,10 +961,10 @@ filter New-GitHubReleaseAsset
$Path = Resolve-UnverifiedPath -Path $Path
$file = Get-Item -Path $Path
$fileName = $file.Name
$fileNameEncoded = [System.Web.HTTPUtility]::UrlEncode($fileName)
$fileNameEncoded = [Uri]::EscapeDataString($fileName)
$queryParams = @("name=$fileNameEncoded")

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

$params = @{
Expand Down

0 comments on commit e1bd0a4

Please sign in to comment.