Functions/New-GitHubPullRequest.ps1
function New-GitHubPullRequest { [CmdletBinding()] param ( [Parameter(Mandatory)] [string] $Title, [Parameter()] [int] $IssueNo, [Parameter()] [string] $Body, [Parameter()] [switch] $Merge ) $BodyString = "" if ($Body) { $BodyString = "$($BodyString) $($Body)" } if ($IssueNo) { $BodyString = "$($BodyString) - Fixes #$($IssueNo)" } $BodyString = $BodyString.Trim() gh pr create -t $Title -b $BodyString gh pr list if ($Merge) { gh pr merge } } |