functions/github/Test-GitHubPrByBranchName.ps1

function Test-GitHubPrByBranchName
{
    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true)]
        [string] $OrgName,
        
        [Parameter(Mandatory=$true)]
        [string] $RepoName,

        [Parameter(Mandatory=$true)]
        [string] $BranchName,

        [Parameter()]
        [ValidateSet("open", "closed", "all")]
        [string] $State = "open"
    )

    if (Get-GitHubPrByBranchName @PSBoundParameters) {
        return $true
    }
    else { 
        return $false
    }
}