feat: inline COMMENT-state PR review (findings anchored to changed lines) (#18)
Build & push image / build-and-push (push) Successful in 8s
Build & push image / build-and-push (push) Successful in 8s
Co-authored-by: Steve Dudenhoeffer <[email protected]> Co-committed-by: Steve Dudenhoeffer <[email protected]>
This commit was merged in pull request #18.
This commit is contained in:
@@ -52,7 +52,7 @@ func TestRenderConsensusFoldsSingleModelNits(t *testing.T) {
|
||||
{Lens: "security", File: "a.go", Line: 10, Severity: "high", Title: "auth bypass"},
|
||||
}},
|
||||
}
|
||||
out := renderConsensus(models)
|
||||
out := renderConsensus(models, clusterFindings(models))
|
||||
// Headline table: the agreed finding with a 2/2 badge.
|
||||
if !strings.Contains(out, "2/2") {
|
||||
t.Errorf("expected a 2/2 agreement badge in headline:\n%s", out)
|
||||
@@ -78,7 +78,7 @@ func TestRenderConsensusHighSeverityLoneFindingStaysHeadline(t *testing.T) {
|
||||
{Lens: "security", File: "a.go", Line: 1, Severity: "critical", Title: "rce"},
|
||||
}},
|
||||
}
|
||||
out := renderConsensus(models)
|
||||
out := renderConsensus(models, clusterFindings(models))
|
||||
headline := out
|
||||
if i := strings.Index(out, "single-model finding"); i >= 0 {
|
||||
headline = out[:i]
|
||||
@@ -113,7 +113,7 @@ func TestRenderConsensusExcludesErroredFromDenominator(t *testing.T) {
|
||||
{Lens: "security", File: "a.go", Line: 9, Severity: "medium", Title: "leak"}}},
|
||||
{Model: "broken", Verdict: "reviewer failed", Errored: true, Markdown: "boom"},
|
||||
}
|
||||
out := renderConsensus(models)
|
||||
out := renderConsensus(models, clusterFindings(models))
|
||||
// Denominator is the 2 effective models, not 3; the failure is noted.
|
||||
if !strings.Contains(out, "2/2") {
|
||||
t.Errorf("errored model must be excluded from the denominator (want 2/2):\n%s", out)
|
||||
@@ -133,7 +133,7 @@ func TestRenderConsensusLoneHighFolds(t *testing.T) {
|
||||
{Model: "solo", Verdict: "Blocking issues found", Markdown: "x", Findings: []outFinding{
|
||||
{Lens: "security", File: "a.go", Line: 1, Severity: "high", Title: "maybe-bug"}}},
|
||||
}
|
||||
out := renderConsensus(models)
|
||||
out := renderConsensus(models, clusterFindings(models))
|
||||
head := out
|
||||
if i := strings.Index(out, "single-model finding"); i >= 0 {
|
||||
head = out[:i]
|
||||
|
||||
Reference in New Issue
Block a user