...

Text file src/github.com/Azure/azure-sdk-for-go/eng/common/scripts/Get-PullRequestCreator.ps1

Documentation: github.com/Azure/azure-sdk-for-go/eng/common/scripts

     1param (
     2    [Parameter(Mandatory = $true)]
     3    [string]$RepoOwner,
     4
     5    [Parameter(Mandatory = $true)]
     6    [string]$RepoName,
     7
     8    [Parameter(Mandatory = $true)]
     9    $PullRequestNumber,
    10
    11    [Parameter(Mandatory = $true)]
    12    [string]$AuthToken
    13)
    14
    15. (Join-Path $PSScriptRoot common.ps1)
    16
    17try
    18{
    19    $pullRequest = Get-GithubPullRequest -RepoOwner $RepoOwner -RepoName $RepoName `
    20    -PullRequestNumber $PullRequestNumber -AuthToken $AuthToken
    21    Write-Host "##vso[task.setvariable variable=System.PullRequest.Creator;]$($pullRequest.user.login)"
    22}
    23catch
    24{
    25    Write-Error "Get-PullRequest failed with exception:`n$_"
    26    exit 1
    27}
    28

View as plain text