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 Jun 8, 2020
1 parent ca8fe16 commit ce85921
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions GitHubReleases.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ filter Get-GitHubRelease
Gets all releases for the default configured owner/repository.
.EXAMPLE
Get-GitHubRelease -ReleaseId 12345
Get-GitHubRelease -Release 12345
Get a specific release for the default configured owner/repository
Expand Down Expand Up @@ -244,7 +244,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 @@ -303,6 +303,7 @@ filter New-GitHubRelease

[string] $Name,

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

[switch] $Draft,
Expand Down Expand Up @@ -391,7 +392,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 @@ -452,6 +453,7 @@ filter Set-GitHubRelease

[string] $Name,

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

[switch] $Draft,
Expand Down Expand Up @@ -904,7 +906,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 @@ -948,10 +952,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 ce85921

Please sign in to comment.