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 18, 2020
1 parent 959eb1a commit 1970ebd
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 @@ -254,7 +254,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 @@ -313,6 +313,7 @@ filter New-GitHubRelease

[string] $Name,

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

[switch] $Draft,
Expand Down Expand Up @@ -401,7 +402,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 @@ -462,6 +463,7 @@ filter Set-GitHubRelease

[string] $Name,

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

[switch] $Draft,
Expand Down Expand Up @@ -914,7 +916,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 @@ -958,10 +962,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 1970ebd

Please sign in to comment.