(options = {})
| 182 | } |
| 183 | |
| 184 | function recordPrReviewResult(options = {}) { |
| 185 | const projectRoot = path.resolve(options.projectRoot || process.cwd()); |
| 186 | const repo = options.repo || 'current-repo'; |
| 187 | const prNumber = options.prNumber || options.pr || 'current'; |
| 188 | const filePath = path.join(planningDir(projectRoot, 'pr-review'), `${slugify(repo)}-${prNumber}.json`); |
| 189 | const current = fs.existsSync(filePath) |
| 190 | ? JSON.parse(fs.readFileSync(filePath, 'utf8')) |
| 191 | : createPrReviewPlan({ projectRoot, repo, prNumber }); |
| 192 | current.results = [...(current.results || []), { |
| 193 | source: options.source || 'codex-review', |
| 194 | status: options.status || 'recorded', |
| 195 | summary: options.summary || '', |
| 196 | recordedAt: nowIso(options), |
| 197 | }]; |
| 198 | writeJson(filePath, current); |
| 199 | return current; |
| 200 | } |
| 201 | |
| 202 | function recordAppArtifact(options = {}) { |
| 203 | const projectRoot = path.resolve(options.projectRoot || process.cwd()); |
no test coverage detected