AzurePipelinesEnvironmentInfo.

PullRequest Property

Summary

Gets Azure Pipelines pull request information.

Syntax

public AzurePipelinesPullRequestInfo PullRequest { get; }

Examples

if (BuildSystem.AzurePipelines.IsRunningOnAzurePipelines)
{
    Information(
        @"PullRequest:
        IsPullRequest: {0}
        Id: {1}
        Number: {2}",
        BuildSystem.AzurePipelines.Environment.PullRequest.IsPullRequest,
        BuildSystem.AzurePipelines.Environment.PullRequest.Id,
        BuildSystem.AzurePipelines.Environment.PullRequest.Number
        );
}
else
{
    Information("Not running on Azure Pipelines");
}
if (AzurePipelines.IsRunningOnAzurePipelines)
{
    Information(
        @"PullRequest:
        IsPullRequest: {0}
        Id: {1}
        Number: {2}",
        AzurePipelines.Environment.PullRequest.IsPullRequest,
        AzurePipelines.Environment.PullRequest.Id,
        AzurePipelines.Environment.PullRequest.Number
        );
}
else
{
    Information("Not running on Azure Pipelines");
}

Value

Type Description
AzurePipelinesPullRequestInfo The Azure Pipelines pull request information.