TravisCIEnvironmentInfo.

Repository Property

Summary

Gets Travis CI repository information for the current build.

Syntax

public TravisCIRepositoryInfo Repository { get; }

Examples

if (BuildSystem.TravisCI.IsRunningOnTravisCI)
{
    Information(
        @"Repository:
        Commit: {0}
        CommitRange: {1}
        PullRequest: {2}",
        BuildSystem.TravisCI.Environment.Repository.Commit,
        BuildSystem.TravisCI.Environment.Repository.CommitRange,
        BuildSystem.TravisCI.Environment.Repository.PullRequest
        );
}
else
{
    Information("Not running on TravisCI");
}
if (TravisCI.IsRunningOnTravisCI)
{
    Information(
        @"Repository:
        Commit: {0}
        CommitRange: {1}
        PullRequest: {2}",
        TravisCI.Environment.Repository.Commit,
        TravisCI.Environment.Repository.CommitRange,
        TravisCI.Environment.Repository.PullRequest
        );
}
else
{
    Information("Not running on TravisCI");
}

Value

Type Description
TravisCIRepositoryInfo The repository.