(ctx, lastWorkingDir)
| 12 | |
| 13 | /** Resolve which repo path an open/action context refers to, by precedence. */ |
| 14 | export function resolveRepoPath(ctx, lastWorkingDir) { |
| 15 | const fromInput = |
| 16 | ctx && ctx.input && typeof ctx.input.repoPath === "string" ? ctx.input.repoPath : null; |
| 17 | const fromSession = |
| 18 | ctx && ctx.session && ctx.session.workingDirectory ? ctx.session.workingDirectory : null; |
| 19 | // No process.cwd() fallback: that resolves to the extension's own directory, |
| 20 | // not the user's repo, and would make the cockpit scan unrelated files. When |
| 21 | // nothing resolves we return null and the UI shows a "repo not available" |
| 22 | // state instead of plausible-but-wrong data. |
| 23 | return fromInput || fromSession || lastWorkingDir || null; |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * Scan the repo and attach the environment readiness report. Tool probing is |
no outgoing calls
no test coverage detected