WoodpeckerCIEnvironmentInfo.

Commit Property

Summary

Gets WoodpeckerCI commit information.

Syntax

public WoodpeckerCICommitInfo Commit { get; }

Examples

if (BuildSystem.WoodpeckerCI.IsRunningOnWoodpeckerCI)
{
    Information(
        @"Commit:
        SHA: {0}
        Branch: {1}
        Message: {2}",
        BuildSystem.WoodpeckerCI.Environment.Commit.Sha,
        BuildSystem.WoodpeckerCI.Environment.Commit.Branch,
        BuildSystem.WoodpeckerCI.Environment.Commit.Message
        );
}
else
{
    Information("Not running on WoodpeckerCI");
}
if (WoodpeckerCI.IsRunningOnWoodpeckerCI)
{
    Information(
        @"Commit:
        SHA: {0}
        Branch: {1}
        Message: {2}",
        WoodpeckerCI.Environment.Commit.Sha,
        WoodpeckerCI.Environment.Commit.Branch,
        WoodpeckerCI.Environment.Commit.Message
        );
}
else
{
    Information("Not running on WoodpeckerCI");
}

Value

Type Description
WoodpeckerCICommitInfo The WoodpeckerCI commit information.