(projectRoot, reports, options = {})
| 147 | } |
| 148 | |
| 149 | function orderReports(projectRoot, reports, options = {}) { |
| 150 | const isAncestor = options.isAncestor || ((ancestor, descendant) => defaultIsAncestor(projectRoot, ancestor, descendant)); |
| 151 | return [...reports].sort((left, right) => { |
| 152 | if (left.head && right.head) { |
| 153 | if (isAncestor(left.head, right.head)) return -1; |
| 154 | if (isAncestor(right.head, left.head)) return 1; |
| 155 | } |
| 156 | const generated = String(left.generatedAt || '').localeCompare(String(right.generatedAt || '')); |
| 157 | if (generated !== 0) return generated; |
| 158 | return String(left.branch || '').localeCompare(String(right.branch || '')); |
| 159 | }); |
| 160 | } |
| 161 | |
| 162 | function blockerReasons(report) { |
| 163 | const reasons = []; |
no test coverage detected