swarm ui: the PR report's approvals column filters on whether the rule is met
The report had an approvals column (1/2) and a separate approved column. They are one fact, so approvals now carries the filter, complete or missing, and the approved column is gone.
This commit is contained in:
parent
cac9b40714
commit
71a4d1d255
1 changed files with 27 additions and 12 deletions
|
|
@ -55,6 +55,12 @@ export function hasAllApprovals(row: PrReportRow): boolean {
|
|||
return row.approvals >= row.required_approvals;
|
||||
}
|
||||
|
||||
/** What the approvals column filters on: whether the PR has all the approvals
|
||||
* its base branch asks for. */
|
||||
export function approvalsState(row: PrReportRow): "complete" | "missing" {
|
||||
return hasAllApprovals(row) ? "complete" : "missing";
|
||||
}
|
||||
|
||||
/** The diff size cell: lines added and removed, `+120 −8`. A count the forge
|
||||
* did not give reads as a dash. */
|
||||
export function diffText(row: PrReportRow): string {
|
||||
|
|
|
|||
Loading…
Reference in a new issue