Skip to content

Commit

Permalink
Fix adding "Ignore" label to new release PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
andyleejordan committed Jul 15, 2021
1 parent 35e3963 commit 103452b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tools/ReleaseTools.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,9 @@ function New-ReleasePR {
git push origin $Branch
}

$LabelParams = @{
OwnerName = "PowerShell"
RepositoryName = $RepositoryName
Label = "Ignore"
}
$Repo = Get-GitHubRepository -OwnerName PowerShell -RepositoryName $RepositoryName

$PRParams = @{
$Params = @{
Head = $Branch
Base = "master"
Draft = $true
Expand All @@ -381,9 +377,13 @@ function New-ReleasePR {
Confirm = $ConfirmPreference
}

$PR = Get-GitHubLabel @LabelParams | New-GitHubPullRequest @PRParams
$PR = $Repo | New-GitHubPullRequest @Params
Write-Host "Draft PR URL: $($PR.html_url)"

# NOTE: The API is weird. According to GitHub, all PRs are Issues, so this
# works, but the module doesn't support it as easily as it could.
$Repo | Add-GitHubIssueLabel -Issue $PR.PullRequestNumber -LabelName "Ignore"

Pop-Location
}

Expand Down

0 comments on commit 103452b

Please sign in to comment.