Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f02d0d8

Browse files
Fix adding "Ignore" label to new release PRs
1 parent afbfa18 commit f02d0d8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎tools/ReleaseTools.psm1‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,9 @@ function New-ReleasePR {
365365
git push origin $Branch
366366
}
367367

368-
$LabelParams = @{
369-
OwnerName = "PowerShell"
370-
RepositoryName = $RepositoryName
371-
Label = "Ignore"
372-
}
368+
$Repo = Get-GitHubRepository -OwnerName PowerShell -RepositoryName $RepositoryName
373369

374-
$PRParams = @{
370+
$Params = @{
375371
Head = $Branch
376372
Base = "master"
377373
Draft = $true
@@ -381,9 +377,13 @@ function New-ReleasePR {
381377
Confirm = $ConfirmPreference
382378
}
383379

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

383+
# NOTE: The API is weird. According to GitHub, all PRs are Issues, so this
384+
# works, but the module doesn't support it as easily as it could.
385+
$Repo | Add-GitHubIssueLabel -Issue $PR.PullRequestNumber -LabelName "Ignore"
386+
387387
Pop-Location
388388
}
389389

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /