BitriseEnvironmentInfo.

Repository Property

Summary

Gets Bitrise repository information.

Syntax

public BitriseRepositoryInfo Repository { get; }

Examples

if (BuildSystem.Bitrise.IsRunningOnBitrise)
{
    Information(
        @"Repository:
        Git Repository Url: {0}
        Git Branch: {1}
        Git Tag: {2}
        Git Commit: {3}
        Pull Request: {4}",
        BuildSystem.Bitrise.Environment.Repository.GitRepositoryUrl,
        BuildSystem.Bitrise.Environment.Repository.GitBranch,
        BuildSystem.Bitrise.Environment.Repository.GitTag,
        BuildSystem.Bitrise.Environment.Repository.GitCommit,
        BuildSystem.Bitrise.Environment.Repository.PullRequest
        );
}
else
{
    Information("Not running on Bitrise");
}
if (Bitrise.IsRunningOnBitrise)
{
    Information(
        @"Repository:
        Git Repository Url: {0}
        Git Branch: {1}
        Git Tag: {2}
        Git Commit: {3}
        Pull Request: {4}",
        Bitrise.Environment.Repository.GitRepositoryUrl,
        Bitrise.Environment.Repository.GitBranch,
        Bitrise.Environment.Repository.GitTag,
        Bitrise.Environment.Repository.GitCommit,
        Bitrise.Environment.Repository.PullRequest
        );
}
else
{
    Information("Not running on Bitrise");
}

Value

Type Description
BitriseRepositoryInfo The repository.