refactor(cli): extract interactive menu logic into reusable module
This commit is contained in:
@@ -151,7 +151,7 @@ export async function createPR(
|
||||
}
|
||||
|
||||
const match = stdout.match(/(https?:\/\/[^\s]+)/);
|
||||
return match ? match[1] : stdout.trim();
|
||||
return match?.[1] ?? stdout.trim();
|
||||
}
|
||||
|
||||
const args = [
|
||||
@@ -180,5 +180,5 @@ export async function createPR(
|
||||
}
|
||||
|
||||
const match = stdout.match(/(https?:\/\/[^\s]+)/);
|
||||
return match ? match[1] : stdout.trim();
|
||||
return match?.[1] ?? stdout.trim();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user