b26cc1c0b6
Co-authored-by: Copilot <copilot@github.com>
29 lines
1.0 KiB
C#
29 lines
1.0 KiB
C#
namespace ControlPlane.Core.Models;
|
|
|
|
public enum ConformanceViolation { OK, Missing, Diverged, Stale }
|
|
public enum ConformanceSeverity { OK, Info, Warning, Critical }
|
|
|
|
/// <summary>
|
|
/// The conformance state of one branch in the TBD ladder relative to its upstream source.
|
|
/// </summary>
|
|
public record BranchConformanceCheck(
|
|
string Branch,
|
|
string? SourceBranch, // the upstream branch this is derived from (null for trunk)
|
|
ConformanceViolation Violation,
|
|
ConformanceSeverity Severity,
|
|
string Detail,
|
|
int AheadOfSource, // commits this branch has that source doesn't — diverged
|
|
int BehindSource, // commits source has that this branch doesn't — pending promotion
|
|
string? FixSha // source tip SHA — used when resetting to fix divergence
|
|
);
|
|
|
|
/// <summary>
|
|
/// Full TBD conformance report for a single repository.
|
|
/// IsConformant = no Diverged or Missing violations exist.
|
|
/// </summary>
|
|
public record ConformanceReport(
|
|
string Repo,
|
|
bool IsConformant,
|
|
BranchConformanceCheck[] Checks
|
|
);
|