| 569 | } |
| 570 | |
| 571 | record CodeownersCheck(CodeOwnerError[] errors, GHContent content) |
| 572 | implements Information { |
| 573 | public String summary() { |
| 574 | // formatter:off |
| 575 | return "- %s Codeowners - %s%s%s".formatted( |
| 576 | (ok() ? "💚" : "❌"), |
| 577 | (ok() ? "File is valid" : "File has errors"), |
| 578 | Stream.of(errors) |
| 579 | .map(CodeOwnerError::summary) |
| 580 | .collect(Collectors.joining("")), |
| 581 | urlText(content)); |
| 582 | // formatter:on |
| 583 | } |
| 584 | |
| 585 | public String markdownSummary() { |
| 586 | return "- [%s] %s Codeowners - %s%s%s".formatted( |
| 587 | (ok() ? "x" : " "), |
| 588 | (ok() ? "💚" : "❌"), |
| 589 | (ok() ? "File is valid" : "File has errors"), |
| 590 | Stream.of(errors) |
| 591 | .map(CodeOwnerError::markdownSummary) |
| 592 | .collect(Collectors.joining("")), |
| 593 | urlText(content)).replace(" \n", "\n"); |
| 594 | } |
| 595 | |
| 596 | boolean ok() { |
| 597 | return errors == null || errors.length == 0; |
| 598 | } |
| 599 | } |
| 600 | |
| 601 | record ContentCheck(String name, String description, Kind kind, boolean ok, GHContent content) |
| 602 | implements Information { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…