OPC # 0006: OPC Git Trunk-Based management
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
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
|
||||
);
|
||||
Reference in New Issue
Block a user