import { execFileSync } from 'node:child_process';
export function resolveRepositoryNameWithOwner(cwd) {
    const output = execFileSync('gh', ['repo', 'view', '--json', 'nameWithOwner'], { cwd, encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });
    const repo = JSON.parse(output);
    if (!repo.nameWithOwner) {
        throw new Error('gh repo view did not return nameWithOwner');
    }
    return repo.nameWithOwner;
}
//# sourceMappingURL=repository.js.map