(projectRoot, branch, options = {})
| 133 | } |
| 134 | |
| 135 | function currentBranchHead(projectRoot, branch, options = {}) { |
| 136 | if (!branch) return null; |
| 137 | if (options.resolveBranchHead) return options.resolveBranchHead(branch); |
| 138 | return resolveGitRef(projectRoot, `refs/remotes/origin/${branch}`) |
| 139 | || resolveGitRef(projectRoot, `refs/heads/${branch}`); |
| 140 | } |
| 141 | |
| 142 | function annotateCurrentHeads(projectRoot, reports, options = {}) { |
| 143 | return reports.map((report) => ({ |
no test coverage detected