|
9 | 9 | gitTry, |
10 | 10 | ghTryAsync, |
11 | 11 | GH_TIMEOUT_MS, |
12 | | - isGitHubRemote, |
| 12 | + isGitHubRemoteAsync, |
13 | 13 | isGhAuthFailure, |
14 | 14 | tailErr, |
15 | 15 | } = require("./worktrees.js"); |
@@ -213,7 +213,7 @@ async function fetchIssue(projectPath, ref, opts) { |
213 | 213 | return { ok: false, reason: "not a GitHub repo" }; |
214 | 214 | } |
215 | 215 | const originUrl = String(remote.stdout || "").trim(); |
216 | | - if (!isGitHubRemote(originUrl)) { |
| 216 | + if (!(await isGitHubRemoteAsync(originUrl))) { |
217 | 217 | return { ok: false, reason: "not a GitHub repo" }; |
218 | 218 | } |
219 | 219 |
|
@@ -427,7 +427,7 @@ async function setPlanStatus(projectPath, number, status) { |
427 | 427 | } |
428 | 428 |
|
429 | 429 | const remote = gitTry(cwd, ["remote", "get-url", "origin"]); |
430 | | - if (!remote.ok || !isGitHubRemote(String(remote.stdout || "").trim())) { |
| 430 | + if (!remote.ok || !(await isGitHubRemoteAsync(String(remote.stdout || "").trim()))) { |
431 | 431 | return { ok: false, reason: "not a GitHub repo" }; |
432 | 432 | } |
433 | 433 |
|
@@ -472,7 +472,7 @@ async function reopenIssue(projectPath, number, opts) { |
472 | 472 | } |
473 | 473 |
|
474 | 474 | const remote = gitTry(cwd, ["remote", "get-url", "origin"]); |
475 | | - if (!remote.ok || !isGitHubRemote(String(remote.stdout || "").trim())) { |
| 475 | + if (!remote.ok || !(await isGitHubRemoteAsync(String(remote.stdout || "").trim()))) { |
476 | 476 | return { ok: false, reason: "not a GitHub repo" }; |
477 | 477 | } |
478 | 478 |
|
@@ -532,7 +532,7 @@ async function completeIssue(projectPath, number, opts) { |
532 | 532 | } |
533 | 533 |
|
534 | 534 | const remote = gitTry(cwd, ["remote", "get-url", "origin"]); |
535 | | - if (!remote.ok || !isGitHubRemote(String(remote.stdout || "").trim())) { |
| 535 | + if (!remote.ok || !(await isGitHubRemoteAsync(String(remote.stdout || "").trim()))) { |
536 | 536 | return { ok: false, reason: "not a GitHub repo" }; |
537 | 537 | } |
538 | 538 |
|
@@ -598,7 +598,7 @@ async function commentIssue(projectPath, number, body) { |
598 | 598 | if (!text) return { ok: false, reason: "empty comment" }; |
599 | 599 |
|
600 | 600 | const remote = gitTry(cwd, ["remote", "get-url", "origin"]); |
601 | | - if (!remote.ok || !isGitHubRemote(String(remote.stdout || "").trim())) { |
| 601 | + if (!remote.ok || !(await isGitHubRemoteAsync(String(remote.stdout || "").trim()))) { |
602 | 602 | return { ok: false, reason: "not a GitHub repo" }; |
603 | 603 | } |
604 | 604 |
|
@@ -644,7 +644,7 @@ async function createIssue(projectPath, input) { |
644 | 644 | if (!cwd) return { ok: false, reason: "not a GitHub repo" }; |
645 | 645 |
|
646 | 646 | const remote = gitTry(cwd, ["remote", "get-url", "origin"]); |
647 | | - if (!remote.ok || !isGitHubRemote(String(remote.stdout || "").trim())) { |
| 647 | + if (!remote.ok || !(await isGitHubRemoteAsync(String(remote.stdout || "").trim()))) { |
648 | 648 | return { ok: false, reason: "not a GitHub repo" }; |
649 | 649 | } |
650 | 650 |
|
|
0 commit comments